Re: [gtk-list] gtkobject->ref_count ?



Ketil Froyn <ketilf@ifi.uio.no> writes:

> Gtk-CRITICAL **: file gtkobject.c: line 1172 (gtk_object_unref): assertion
> `object->ref_count > 0' failed.
> 
> OK. What does this mean? I've been looking around, searching the docs,
> dejanews, and the source. gtkobject.c refers me to the file REFCOUNTING,
> which of course doesn't exist :)

It's `docs/refcounting.txt'.

> So i'm still trying to understand what i've done wrong. This happens when
> i'm trying to gtk_widget_unref() a drawing_area.

Did you do a gtk_widget_ref on your drawing_area?  You must always use
the ref/unref functions in pairs.  You don't `own' the widget returned
by gtk_drawing_area_new.  You can just put it in some container and
forget about it.

- Marius



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