SharedPtr now has referenceCount() member fn

This commit is contained in:
Guenter Obiltschnig
2008-09-26 13:36:51 +00:00
parent c60067167f
commit 6ea765969d
2 changed files with 17 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
//
// SharedPtr.h
//
// $Id: //poco/1.3/Foundation/include/Poco/SharedPtr.h#5 $
// $Id: //poco/1.3/Foundation/include/Poco/SharedPtr.h#6 $
//
// Library: Foundation
// Package: Core
@@ -68,6 +68,11 @@ public:
FastMutex::ScopedLock lock(_mutex);
return --_cnt;
}
int referenceCount() const
{
return _cnt;
}
private:
FastMutex _mutex;
@@ -364,6 +369,11 @@ public:
{
return get() >= ptr;
}
int referenceCount() const
{
return _pCounter->referenceCount();
}
private:
C* deref() const