GNOME Bugzilla – Bug 358294
Gnome2::GConf leaks memory for all retrieved values
Last modified: 2006-09-29 13:42:46 UTC
The following simple program grows indefinitely in size: use Gnome2::GConf; $client = Gnome2::GConf::Client->get_default; $client->get("/apps/metacity/general/button_layout") while 1; The simple fix is probably to add a DESTROY function to GConfValue.xs to release the underlying GConfValue when the perl value goes out of scope: void DESTROY(value) GConfValue * value CODE: gconf_value_free(value); or something like that.
Created attachment 73630 [details] Graph of memory usage of the test program
The test was run with Gnome2:GConf version 1.030, but I checked 1.040 sources and there was no DESTROY visible so its probably reasonable to assume the problem is present in 1.040 too.
thanks, this should now have been fixed in HEAD. I'll release 1.041 shortly. 2006-09-29 Emmanuele Bassi <ebassi@gmail.com> * GConf.pm: Bump to 1.041. * xs/GConfValue.xs: Add a DESTROY function for removing the GConfValue structure, as it's not a GType, so we don't have all the convenient memory handling provided by the gperl bindings. (#358294, Santeri Paavolainen)