[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
mailing_list:
> 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
> like:
>
> withGC :: Drawable -> (Display -> Drawable -> GC -> FontStruct -> X ()) -> X ()
>
> If this is ok, I'll send the patch (and you can forget this one).
>
> Andrea
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.
-- Don
More information about the Xmonad
mailing list