gdkpixmap destruction

When creating gdkpixmaps and using gtk_pixmap_set.  Does the previous
gdkpixmap get unreferenced and therefore destroyed?  My basic code scenario
is this.

gdkpixmap = gdk_pixmap_new (default parameters);
-- Does gdkpixmap have a reference count of 1?
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.

What is the deal regarding gdkpixmap and gtkpixmaps?  If the gtkpixmap is
reset, will it unref the previous gdkpixmap (and therefore destroy it
providing no other references were placed on it), or do I have to take care
of the reference counting myself?

Thanks for your time

Ian King

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