From: Kevin Ryde <user42@zip.com.au>
To: guile-gtk@sources.redhat.com
Subject: gtk-container-children memory leak
Date: Fri, 24 Jan 2003 15:05:00 -0000 [thread overview]
Message-ID: <87wukuio68.fsf@zip.com.au> (raw)
I think gtk-container-children might be leaking memory. On a recent
i386 debian and my build of guile 1.6.1, the following little program
uses an apparently ever increasing amount of core (as shown by the
"top" program).
(use-modules (gtk gtk))
(define toplevel (gtk-window-new 'toplevel))
(gtk-container-add toplevel (gtk-label-new "foo"))
(while #t
(gtk-container-children toplevel))
I think gtk_container_children allocates a fresh GList for its return,
which the caller is supposed to free. As far as I can tell that
doesn't happen in gtk-glue.c etc.
Inserting a g_list_free manually into sgtk_gtk_container_children
seems to do the trick, but I'm not smart enough to tell how to get
that done properly.
It'd probably be good to allow either freeing or not.
gtk_container_children and a prospective gdk_list_visuals should free,
gtk_radio_button_group (which is a GSList) and a prospective
gdk_window_peek_children (implementing gtk-window-children) shouldn't.
next reply other threads:[~2003-01-24 15:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-24 15:05 Kevin Ryde [this message]
2003-06-19 1:14 ` Kevin Ryde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wukuio68.fsf@zip.com.au \
--to=user42@zip.com.au \
--cc=guile-gtk@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).