Re: Gdkpixmap Memory leak



On Thu, 2003-08-07 at 18:54, Harring Figueiredo wrote:
 I believe that this rule does not apply to certain objects (widgets) added to
a container as the container will not increase the ref_count, but "sink" the
object. 

 When I add a pixmap to, say, a gtktreeview, I do, however, use the
object_unref (Which is the correct way.) I guess it is a bit confusing
(espcially to newbies like me:) to figure out when an object MUST be unref'ed
by us. Any rules ?

Well, the rule is that only objects deriving from GtkObject (widgets,
GtkCellRenderer, GtkTreeViewColumn, mainly) have the float/sink
behavior.

Regards,
                                                Owen





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]