Close

Relief for ODA Team in Ukraine

Learn more
ODA Kernel SDK
OdSmartPtr<class T>::attach Method (const T*)
Syntax
C++
void attach(const T* pObject);

Assigns the pointer of the specifed object to the smart pointer without incrementing its reference counter. 

 

Parameters
Description
pObject
[in] Pointer to the specifed object to be assigned.

The reference counter of the specified object is not incremented. 

If the smart pointer is currently referencing to another object, that object is released prior to the assignment.

Example of a Typified Smart Pointer

Copyright © 2002-2022. Open Design Alliance All rights reserved.