Re: [gtk-list] g_list memory leaks
- From: Owen Taylor <owt1 cornell edu>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] g_list memory leaks
- Date: Sat, 16 Aug 1997 23:56:37 -0400
> (Sorry for all the code) Notice that the g_list 'layer_list' is never
> freed with g_list_free. Is this because it is used directly by the
> gtk_list, or is it just a memory leek? Oh, and could someone also explain
> the suspend_gimage_notify++/--?
I think its fine. If you look at the implementation o
gtk_list_insert_items, you'll find that the list passed in is inserted
into a linked list of child widgets without a copy. Whether it's good
design is another question ... this is the type of thing that can lead
to problems with reference counting in Perl bindings, for example;
though this case isn't really a problem since there already should be
code to translate the GList into a native Perl list.
Without looking at the GIMP source code, I think the ++/-- stuff just
keeps lots of unnecessary updates from happening in callbacks for Layer
list items. The callbacks probably check:
if (suspend_gimage_notify == 0)
{
[ do whatever needs needs to be done ]
}
Using ++/-- allows multiple simultaneous suspensions.
But maybe you wanted to know _what_ was being suspended ...
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]