GameShield V5 SDK Programming Guide
v5.2
|
gs::TGSObject Class Reference
Base of GS5 Objects. More...
Inheritance diagram for gs::TGSObject:
Public Member Functions | |
gs_handle_t | handle () const |
Gets GS5 object handle. | |
Detailed Description
Base of GS5 Objects.
In C++, the OOP-SDK apis return pointer to an instance of TGSObject subclass, the caller must delete it later to avoid memory leakage.
TGSVariable * pVar = act->ParamByIndex(0);
int v = pVar->asInt(); //uses pVar
delete pVar; //release it once done
or simply uses std::auto_ptr<T>:
std::auto_ptr<TGSVariable> var(act->getParamByIndex(0));
*
Generated on Mon Feb 3 2014 13:15:29 for GameShield V5 SDK Programming Guide by 1.8.5