Re: [gtk-list] [gtk+970606] problems with gtk_widget_destroy()
- From: Peter Mattis <petm scam XCF Berkeley EDU>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] [gtk+970606] problems with gtk_widget_destroy()
- Date: Tue, 10 Jun 1997 19:10:16 -0700
David Mosberger-Tang writes:
>Unfortunately, I don't have much time to track this down. It looks
>like inserting a vbox into an hbox via a gtk_container_add()
>increments the ref count in the vbox by two.
That is exactly what is happening. gtk_container_add calls
gtk_widget_set_parent which is where widgets (objects) get
referenced. But the box container_add functions also calls
gtk_widget_set_parent, referencing the widget again. I've gone through
gtk and fixed places where this occurs. I've also put code into
gtk_widget_set_parent so that it will warn you if you set the parent
of a widget to its current value (which is what happened in this case)
or if you call gtk_widget_set_parent when the widgets parent field is
non-NULL. (ie. It already has a parent).
A patch to do all this follows. (gzipped and uuencoded)
Peter
begin 644 gtk+.patch.gz
M'XL("*P)GC," V=T:RLN<&%T8V@ O5CA<MHX$/X-3Z'V9CHDX-;&!H,[S21I
M2(\>)3.!MC=S<^,:$."#V R8MG>=OOOM6K(MRS+DDO:<)G)7NY+VVV]7DF?^
M?$ZT_79(%M&J_GSBK5[ "_Y._.#Y-);F)%5-T]2ZE>NM3][N T+:1-<=O0G_
MB-'MVM5ZO5X<J#+>TUC=T(G1<5H=QVHQ]?-SHC6;K4:;U+'ID//S*JD20OPY
MJ3T!8^ULNO37LQ.4$?*M6H];G,+]XL\6-')W\+OQMC2(2(V)&N3-^#?W8__J
M36],:M,PB#P_H-N3DY?5.AN'D&QH\HHPLY=L9L)GS\9P/_1'_<M!+QG_A#Q[
M1E3=PE3,,ZL=>V9U),_$V9/I#[BX#_(.ECHR?#\8_%@W9N6D";_*I$&)FC38
M\Q]($ZL72-/L9J0Q[0Y"BTT&;>)S#(=VQMS,(5P!>"OWP!9T8!$<6.@&;!?N
MVM]%[I;>A9\IO <KB*.HTR#)&XR!(W"+^992OB:Q3Q"#[ #.^R@*"_G)A6JT
M>:<"<*,$\,2B@+DI8&ZW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