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: ...@@ -277,6 +277,11 @@ public:
return ptr; return ptr;
} }
int count() const
{
return d ? d->count() : 0;
}
private: private:
class AutoPtrData class AutoPtrData
...@@ -324,6 +329,11 @@ private: ...@@ -324,6 +329,11 @@ private:
return p; return p;
} }
int count() const
{
return c.count();
}
private: private:
T *p; T *p;
AutoCounter c; 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