Re: gdkpixmap destruction



"Ian King" <king eiffel com> writes: 
> gdkpixmap = gdk_pixmap_new (default parameters);
> -- Does gdkpixmap have a reference count of 1?

Yes.

> gtkpixmap = gtk_pixmap_new (gdkpixmap, NULL);
> gdkpixmap2 = gdk_pixmap_new (default parameters);
> gtk_pixmap_set (gdkpixmap2, NULL);
> -- I want gdkpixmap to now be destroyed, I haven't placed any extra
> references on it so in theory it should be but it seems it isn't.

Its refcount is now 1. You need to unref it. 

Objects can never have a reference count of 0 - so gdk_pixmap_new()
necessarily returns a reference.

Havoc




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