Re: [dev] Re: [dmenu] [patch] add xft and fix possible memory leak in version 4.2.1

2010-11-22 Thread Anselm R Garbe
On 22 November 2010 15:26, Connor Lane Smith wrote: > On 22 November 2010 12:01, Anselm R Garbe wrote: >> I prefer to keep cleanup() even if it slows down the performance >> (which I doubt will be noticeable) just for the sake of keeping the >> symmetry that the code that allocates resources also

Re: [dev] Re: [dmenu] [patch] add xft and fix possible memory leak in version 4.2.1

2010-11-22 Thread Dieter Plaetinck
On Mon, 22 Nov 2010 14:26:56 + Connor Lane Smith wrote: > On 22 November 2010 12:01, Anselm R Garbe wrote: > > I prefer to keep cleanup() even if it slows down the performance > > (which I doubt will be noticeable) just for the sake of keeping the > > symmetry that the code that allocates re

Re: [dev] Re: [dmenu] [patch] add xft and fix possible memory leak in version 4.2.1

2010-11-22 Thread Connor Lane Smith
On 22 November 2010 12:01, Anselm R Garbe wrote: > I prefer to keep cleanup() even if it slows down the performance > (which I doubt will be noticeable) just for the sake of keeping the > symmetry that the code that allocates resources also deallocates them. > This might sound a bit pedantic and u

Re: [dev] Re: [dmenu] [patch] add xft and fix possible memory leak in version 4.2.1

2010-11-22 Thread Anselm R Garbe
On 21 November 2010 14:02, Connor Lane Smith wrote: > On 21 November 2010 03:56, Dan Brown wrote: >> 2) dmenu v4.2.1 appears to be leaking memory. It is missing the >> routines to teardown/cleanup memory structures present in previous >> versions. This patch also adds them. > > As Wolf says, ther

[dev] Re: [dmenu] [patch] add xft and fix possible memory leak in version 4.2.1

2010-11-21 Thread Dan Brown
Connor Lane Smith wrote: >Would you be able to produce an Xft-only patch without filter >or tok? I'd also like to see if I can make the patch more "dmenu-like" >(just a few minor points) before we put it on the wiki or an Hg branch Connor- Attached is a patch that adds xft and cleanup routines to

Re: [dev] Re: [dmenu] [patch] add xft and fix possible memory leak in version 4.2.1

2010-11-21 Thread Connor Lane Smith
On 21 November 2010 17:18, Dan Brown wrote: > This was the patch I used as an starting point for adding xft support. > After studying it, I came up with a few ways to simplify it that I > think you'll appreciate. Having compared it to the previous source it definitely does look better. Would you

[dev] Re: [dmenu] [patch] add xft and fix possible memory leak in version 4.2.1

2010-11-21 Thread Dan Brown
Hello. Continuing the discussion ... Connor Lane Smith wrote: > Anselm R Garbe wrote: >> Well for clarity and consistency reasons I prefer if dmenu cleans up >> all resources acquired at the end. So that cleanup() was removes looks >> more like a bug to me and thanks to Dan for pointing this out

Re: [dev] Re: [dmenu] [patch] add xft and fix possible memory leak in version 4.2.1

2010-11-21 Thread Connor Lane Smith
Hey, On 21 November 2010 03:56, Dan Brown wrote: > 2) dmenu v4.2.1 appears to be leaking memory. It is missing the > routines to teardown/cleanup memory structures present in previous > versions. This patch also adds them. As Wolf says, there is no memory leak: there are only mallocs right at th

Re: [dev] Re: [dmenu] [patch] add xft and fix possible memory leak in version 4.2.1

2010-11-21 Thread Dieter Plaetinck
On Sun, 21 Nov 2010 01:22:46 -0800 Dan Brown wrote: > 3) adds 2 other features that I want (but may not be generally > popular): filter mode and token matching "token matching" seems to be the same as the xmms-style matching: http://tools.suckless.org/dmenu/patches/xmms-like_pattern_matching (al

[dev] Re: [dmenu] [patch] add xft and fix possible memory leak in version 4.2.1

2010-11-21 Thread Dan Brown
In response to suggestions on this thread, here is an updated patch for dmenu 4.2.1 that makes the following changes: 1) adds memory cleanup/free routines 2) adds xft font support 2b) moves all code that deals with details of drawing into draw.h and draw.c files, and out of dmenu.c . It's my hope