mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-17 03:03:23 +02:00
SharedPtr now has referenceCount() member fn
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user