1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 08:47:17 +01:00

Implement pointer stealing for the auto-deleter utility.

This commit is contained in:
Sandu Liviu Catalin 2016-07-03 03:20:23 +03:00
parent 46d8d12c74
commit e0fd5fa214

View File

@ -253,6 +253,16 @@ public:
m_Inst = nullptr;
}
/* --------------------------------------------------------------------------------------------
* Released the managed instance.
*/
T * Grab()
{
T * ptr = m_Inst;
m_Inst = nullptr;
return ptr;
}
/* --------------------------------------------------------------------------------------------
* Retrieve the managed instance.
*/