Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

BOOL PContainer::MakeUnique (  ) [virtual, inherited]

Make this instance to be the one and only reference to the container contents. This implicitly does a clone of the contents of the container to make a unique reference. If the instance was already unique then the function does nothing.

TRUE if the instance was already unique.

Reimplemented in PSharedPtr< T >.

Definition at line 786 of file contain.cxx.

References PContainer::IsUnique().

Referenced by PSharedPtr< T >::MakeUnique().

  PEnterAndLeave m(reference->critSec);

  if (IsUnique())
    return TRUE;

  Reference * oldReference = reference;
  reference = new Reference(*reference);

  return FALSE;

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index