This is the mail archive of the guile-gtk@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gtk-container-children memory leak


I wrote:
>
> I think gtk-container-children might be leaking memory.

I propose to free the returned list with the following change.

        * gtk-support.c (_sgtk_helper_toscm_copy_GtkWidget): New function.
        * gtk-support.c, guile-gtk.h (gtk_container_children_interp): New
        function.
        * gdk-1.2.defs (gtk_container_children): Use it.
        This change fixes a memory leak in gtk-container-children, the GList
        returned by gtk_container_children must be freed by the caller.

I suppose I could use _sgtk_helper_toscm_copy_GtkWidget from the glue
file if it wasn't static.  The name would be ok to be a global.  Easy
enough to duplicate for now though.

Attachment: gtk-support.c.container-children.diff
Description: Text document

Attachment: guile-gtk.h.container-children.diff
Description: Text document

Attachment: gtk-1.2.defs.container-children.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]