trunk/branch integration: RefCountedObject to AtomicCounter

This commit is contained in:
Marian Krivos
2011-08-22 17:49:31 +00:00
parent f252f79920
commit abeb31a9c8

View File

@@ -40,7 +40,7 @@
namespace Poco { namespace Poco {
RefCountedObject::RefCountedObject(): _rc(1) RefCountedObject::RefCountedObject(): _counter(1)
{ {
} }
@@ -50,21 +50,4 @@ RefCountedObject::~RefCountedObject()
} }
void RefCountedObject::duplicate() const
{
_rcMutex.lock();
++_rc;
_rcMutex.unlock();
}
void RefCountedObject::release() const
{
_rcMutex.lock();
int rc = --_rc;
_rcMutex.unlock();
if (rc == 0) delete this;
}
} // namespace Poco } // namespace Poco