On 23 October 2011 15:55, Vreixo Formoso Lopes <metalpain2...@yahoo.es> wrote:
> Hi all,
>
> please correct me if I'm wrong, I haven't looked at this since one or two 
> years, but I am pretty
>
> sure about the reason for the leak in the test code. As it never enters gtk 
> main loop, our reference
> to the underlying GdkPixbuf object is never released. That is because we 
> release it in a g_idle
> function that is only executed inside the gtk main loop. So just doing:
>
>
>           while (Gtk.eventsPending()) {
>               Gtk.mainIterationDo(false);
>           }
>
> after Pixbuf creation will solve the memory leak. I've tested it and it works.
>
>

Thanks very much indeed Vrexio, I can confirm running this code after
this fixes the issue in the test and my application. My app is unusual
as it does not have a Gtk.main() loop, presumably I would not have
seen this issue if it did.

Best regards,

Will Temperley

------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
java-gnome-developer mailing list
java-gnome-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/java-gnome-developer

Reply via email to