Commit a787defd authored by Alejandro Homs Puron's avatar Alejandro Homs Puron

AutoObj: add AutoPtr::count() returning reference count

parent 02476694
......@@ -277,6 +277,11 @@ public:
return ptr;
}
int count() const
{
return d ? d->count() : 0;
}
private:
class AutoPtrData
......@@ -324,6 +329,11 @@ private:
return p;
}
int count() const
{
return c.count();
}
private:
T *p;
AutoCounter c;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment