Re: [gtk+970606] problems with gtk_widget_destroy()
- From: David Mosberger-Tang <davidm azstarnet com>
- To: pmattis parker EECS Berkeley EDU, gtk-list redhat com
- Subject: Re: [gtk+970606] problems with gtk_widget_destroy()
- Date: Sat, 14 Jun 1997 13:04:54 -0700
David Mosberger-Tang writes:
David> Unfortunately, I don't have much time to track this down. It looks
David> like inserting a vbox into an hbox via a gtk_container_add()
David> increments the ref count in the vbox by two.
Peter Mattis writes:
Pete> That is exactly what is happening. gtk_container_add calls
Pete> gtk_widget_set_parent which is where widgets (objects) get
Pete> referenced. But the box container_add functions also calls
Pete> gtk_widget_set_parent, referencing the widget again. I've gone through
Pete> gtk and fixed places where this occurs. I've also put code into
Pete> gtk_widget_set_parent so that it will warn you if you set the parent
Pete> of a widget to its current value (which is what happened in this case)
Pete> or if you call gtk_widget_set_parent when the widgets parent field is
Pete> non-NULL. (ie. It already has a parent).
Pete> A patch to do all this follows. (gzipped and uuencoded)
The patch definitely does the trick for xscanimage. Neat!
--david
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]