add Object::GetReferenceCount
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Tue, 08 Jul 2008 10:16:53 -0700
changeset 3394 1680d5004ee8
parent 3393 10369bf4b3e2
child 3395 3b6bc7a4f975
add Object::GetReferenceCount
src/core/object.cc
src/core/object.h
--- a/src/core/object.cc	Tue Jul 08 10:12:38 2008 -0700
+++ b/src/core/object.cc	Tue Jul 08 10:16:53 2008 -0700
@@ -95,6 +95,11 @@
     m_disposed (false),
     m_next (this)
 {}
+uint32_t
+Object::GetReferenceCount (void) const
+{
+  return m_count;
+}
 void
 Object::Construct (const AttributeList &attributes)
 {
--- a/src/core/object.h	Tue Jul 08 10:12:38 2008 -0700
+++ b/src/core/object.h	Tue Jul 08 10:16:53 2008 -0700
@@ -112,6 +112,12 @@
    * dangerous.
    */
   inline void Unref (void) const;
+
+  /**
+   * Get the reference count of the object.  Normally not needed; for language bindings.
+   */
+  uint32_t GetReferenceCount (void) const;
+
   /**
    * \returns a pointer to the requested interface or zero if it could not be found.
    */