[Xmonad] darcs patch: fixes a possible memory leak

Donald Bruce Stewart dons at cse.unsw.edu.au
Mon Jun 25 06:43:56 EDT 2007

> Hi,
> this fixes a possible memory leak: when "loadQueryFont" is called the
> returned FontStruct must be freed after using it.
> By the way, this was the problem of xmobar too.
> Ciao
> Andrea
> Mon Jun 25 12:16:29 CEST 2007  Andrea Rossato <andrea.rossato at unibz.it>
>   * fixes a possible memory leak

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?

-- Don

More information about the Xmonad mailing list