The Ptr constructor initializes a new smart pointer object. The initialization is done slightly differently depending upon what value is passed to it.
if (pobj) pobj->AddRef(); pObject = pobj;
pObject = &robj;
if (pobj) pobj->AddRef(); pObject = pobj;
Parameters |
Description |
C & robj |
A reference to a refcounted object. |
Pickable<C> v |
_nt_ |
Ptr<C>& other |
_nt_ |
C * pobj |
A pointer to a refcounted object. |
const Ptr<C> & src |
A reference to another Ptr object. |