[omniORB] How to get _refCount() on object reference?

Duncan Grisby duncan at grisby.org
Thu Nov 2 11:06:11 GMT 2006


On Monday 23 October, Tuyen Chau wrote:

> Thanks Duncan We need to use _refCount() for debugging purposes
> only.  We have a complex client that routinely obtains hundreds of
> proxy objects through a fairly involved IDL then release them when they
> are done.  These objects can have member variables (in their proxy
> class) that reference each other due to their hierarchical
> relationship.  We have a debugging mechanism in place to track the
> reference count on objects (used with Orbix) to ensure that the objects
> are properly released, and hence, the need to use an equivalent of
> _refCount() in OmniOrb.

If it's just for debugging, then the simple thing is to make the
pd_refCount member public, or make yourself a friend of the omniObjRef
class. I don't want to add an accessor function for the reference count,
because that would encourage people to try to use it for other purposes
than just debugging.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the omniORB-list mailing list