GNOME Bugzilla – Bug 482795
memory leak in Gtk2::Pango::Layout::get_iter
Last modified: 2007-10-03 17:28:29 UTC
Please describe the problem: Calling $layout->get_iter; leaks memory I'm using it to get the y position of the first line ($layout->get_iter->get_baseline) so I can align the layout with other things. Any work-around would be very appreciated. Steps to reproduce: By running the attached test program Actual results: memory usage grows Expected results: Does this happen every time? yes Other information:
Created attachment 96547 [details] test-case program Running this simple program makes memory usage (as seen by top) grows _very_ rapidly (about 5m per second on my system). Be sure to terminate it with ctrl-C. One strange thing I just noticed is that changing the timeout value from 1 to 2 or more, _greatly_ slows the growing of memory usage, I've got no idea why.
Created attachment 96577 [details] [review] Plug the leak Yep, that's a bindings bug. Fixed in CVS. I don't know how you'd work around this leak in Perl, unfortunately.