[Xmonad] darcs patch: fixes a possible memory leak
Donald Bruce Stewart
dons at cse.unsw.edu.au
Mon Jun 25 07:43:59 EDT 2007
> On Mon, Jun 25, 2007 at 08:43:56PM +1000, Donald Bruce Stewart wrote:
> > should we have something like:
> > withFont $ \f -> do
> > some action
> > to track this resource? Or perhaps tie it to ForeignPtr, to have the GC
> > free it automatically?
> Since we have Decoration.withGC and setFont requires the
> G(aphic)C(context) I think we could modify that function. Something
> withGC :: Drawable -> (Display -> Drawable -> GC -> FontStruct -> X ()) -> X ()
> If this is ok, I'll send the patch (and you can forget this one).
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.
More information about the Xmonad