Re: gobject reference question


Boncek, John wrote:
More generally, what leak-detection tools exist?

-----Original Message-----
From: gtk-app-devel-list-bounces gnome org
[mailto:gtk-app-devel-list-bounces gnome org] On Behalf Of Wallace Owen
Sent: Monday, August 15, 2005 1:44 PM
To: gtk-app-devel-list gnome org
Subject: gobject reference question

How can I see what the current reference count is, so I can be sure I'm
using g_object_ref() and g_object_unref() correctly?

 // Wally
two suggestion:
a ref-count debugger with gdb integration and so on

2.) in my unit tests I use:
gboolean g_object_checked_unref(GObject *obj)
  gpointer objref;
  return(objref == NULL);

I call this when unreffing an object which should have no further
references, thus is supposed to be destroyed.
It returns TRUE if that worked.


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