in reply to Bad, bad memory leaks in simple script [solved]
Personally, I don't like the closures over your two globals, but that's unlikely to be the source of your issues.
As an experiment, try to move some of the font logic (and anything else that wouldn't need to be computed each time) out of draw_text.
It may be that the Gtk2 (or Gtk2::Pango) module does some resource caching that you're not aware of. If so, try using Devel::Leak to find those leaks.
-David
|
|---|