[Xmonad] darcs patch: fixes a possible memory leak

Andrea Rossato mailing_list at istitutocolli.org
Mon Jun 25 07:59:42 EDT 2007

On Mon, Jun 25, 2007 at 09:43:59PM +1000, Donald Bruce Stewart wrote:
> I guess its a bit complex, but if that's what needs to be done to handle
> the resource automatically, then it probably should be done.

It is a bit more complex than I first thought. 

We need also Decoration.newDecoration get the font name, if the
decoration is going to have some text on it, but that would automate
the use of those resources.

newDecoration :: Window -> Rectangle -> Int -> Pixel -> Pixel -> String
	         -> (Display -> Window -> GC -> X ()) -> X () -> X Window

I think this would be far better, since GC and FontStruct are major
sources of memory leaks.

I'll submit a patch, so forget about this one.


More information about the Xmonad mailing list