MCPcopy Create free account
hub / github.com/anjo76/angelscript / FreeObject

Method FreeObject

sdk/add_on/scriptany/scriptany.cpp:403–421  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

401}
402
403void CScriptAny::FreeObject()
404{
405 // If it is a handle or a ref counted object, call release
406 if( value.typeId & asTYPEID_MASK_OBJECT )
407 {
408 // Let the engine release the object
409 asITypeInfo *ti = engine->GetTypeInfoById(value.typeId);
410 engine->ReleaseScriptObject(value.valueObj, ti);
411
412 // Release the object type info
413 if( ti )
414 ti->Release();
415
416 value.valueObj = 0;
417 value.typeId = 0;
418 }
419
420 // For primitives, there's nothing to do
421}
422
423
424void CScriptAny::EnumReferences(asIScriptEngine *inEngine)

Callers

nothing calls this directly

Calls 3

GetTypeInfoByIdMethod · 0.80
ReleaseScriptObjectMethod · 0.80
ReleaseMethod · 0.45

Tested by

no test coverage detected