API Reference > Other Classes > OdSmartPtr Template > OdSmartPtr Methods > OdSmartPtr::detach Method
OdSmartPtr::detach Method
Syntax
C++
T* detach();

Returns the raw pointer to the referenced object. The reference counter is not modified for the referenced object. Smart pointer is set to a NULL.

Releases the smart pointer reference to the referenced object without decrementing of the reference counter.

Example of a Typified Smart Pointer

Copyright © 2002–2020. Open Design Alliance. All rights reserved.