Function CSPPtr<T>::Detach()

Description:
Detaches the contained pointer from the smart pointer.

Prototype:
T* Detach();

Arguments:
No arguments (void).

Return value:
The contained pointer.

Remarks:
After the contained pointer is detached, the smart pointer contains a null pointer.

Examples:
CSPPtr<char> sp;
sp.New();
...
char* p = sp.Detach();
...
delete p;

See also:
member function Attach( CSPPtr<T>& spPtr ), Attach( T* p )
CSPPtr<T> | Template classes | Class Categories | Online help home | Back

www.micronovae.com

Copyright © 2002 - 2005 Micronovae Ltd