testing that an object really has been destroyed in unittests



hi hi,

has anyone an idea how I can verify that after a
  g_object_unref(myobj);
the object has been destroyed.

I would like to do this in unit-tests.
Obviously I can't just check for
  G_IS_OBJECT(app)==FALSE
afterwards.

So to clarify this for me:
Does g_object_unref() works with circular stuff?
If not then am I right that the ref-ct *must* be ==1 right before the last
g_object_unref(myobj); to destroy the object, as the implementation of
g_object_unfref can't trigger anything that would further decrement the ref_ct
of my object.

Stefan (who hopes that anyone understands what I am talking about).
-- 
      \|/            Stefan Kost
     <@ @>           private            business
+-oOO-(_)-OOo------------------------------------------------------ - - -  -   -
|       __  Address  Simildenstr. 5     HTWK Leipzig, Fb IMN, Postfach 301166
|      ///           04277 Leipzig      04251 Leipzig
| __  ///            Germany            Germany
| \\\///    Phone    +49341 2253538     +49341 30766101
|  \__/     EMail    st_kost_at_gmx.net kost_at_imn.htwk-leipzig.de
|           WWW      www.sonicpulse.de  www.imn.htwk-leipzig.de/~kost/about.html
===-=-=--=---=---------------------------------- - - -  -    -


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