Re: stupid question regarding pixmaps and reference counts

> >How do I get the reference count of a GdkPixmap?
> >
> Hello (it's about gtk+-2.0),
> It says right, cause GObject -> GdkDrawable -> GdkPixmap.
> You have to cast to GObject*, not to GtkObject*.
> So all you need is: ((GObject*)pixmap)->ref_count.

Right, my code for checking the reference count of a widget
looks like this:

            if (GTK_OBJECT (box)->ref_count > 1)
            if (G_OBJECT (box)->ref_count > 1)


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