[Opalvoip-svn] SF.net SVN: opalvoip:[28387] ptlib/trunk/include/ptlib/safecoll.h
Brought to you by:
csoutheren,
rjongbloed
From: <rjo...@us...> - 2012-09-20 06:08:49
|
Revision: 28387 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=28387&view=rev Author: rjongbloed Date: 2012-09-20 06:08:43 +0000 (Thu, 20 Sep 2012) Log Message: ----------- Added function to get PSafeObject reference count. Modified Paths: -------------- ptlib/trunk/include/ptlib/safecoll.h Modified: ptlib/trunk/include/ptlib/safecoll.h =================================================================== --- ptlib/trunk/include/ptlib/safecoll.h 2012-09-20 06:07:49 UTC (rev 28386) +++ ptlib/trunk/include/ptlib/safecoll.h 2012-09-20 06:08:43 UTC (rev 28387) @@ -263,6 +263,12 @@ @return true if object may be deleted. */ virtual bool GarbageCollection(); + + /**Get count of references to this object. + Note this returns the value outside of any mutexes, so it could change + at any moment. Care must be exercised in its use. + */ + unsigned GetSafeReferenceCount() const { return safeReferenceCount; } //@} private: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |