leak in gtkplotcanvas
[email protected] Wed, 11 Apr 2007 14:36:41 +0100
| Newsgroups | gmane.comp.scigraphica.gtkextra |
|---|---|
| Message-ID | <[email protected]> |
I noticed gtk_plot_canvas_destroy() is not unreffing the pixmap.
I added these lines:
if( plot_canvas->pc ){
gtk_object_unref(GTK_OBJECT(plot_canvas->pc));
plot_canvas->pc = NULL;
}
+ if( plot_canvas->pixmap ){
+ gdk_pixmap_unref(plot_canvas->pixmap);
+ plot_canvas->pixmap = NULL;
+ }
if (GTK_OBJECT_CLASS (parent_class)->destroy)
(*GTK_OBJECT_CLASS (parent_class)->destroy) (object);
gtk_psfont_unref();
}
and my X server no longer grows by a huge amount on each new canvas.
This is in gtkextra 2.1.1, I've not checked the CVS version.
John
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV