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

Method Release

sdk/angelscript/source/as_scriptengine.cpp:1112–1126  ·  view source on GitHub ↗

interface

Source from the content-addressed store, hash-verified

1110
1111// interface
1112int asCScriptEngine::Release() const
1113{
1114 int r = refCount.atomicDec();
1115
1116 if( r == 0 )
1117 {
1118 // It is possible that some function will temporarily increment the engine ref count
1119 // during clean-up for example while destroying the objects in the garbage collector.
1120 if( !inDestructor )
1121 asDELETE(const_cast<asCScriptEngine*>(this),asCScriptEngine);
1122 return 0;
1123 }
1124
1125 return r;
1126}
1127
1128// interface
1129int asCScriptEngine::ShutDownAndRelease()

Callers 3

~asCScriptEngineMethod · 0.45
ReturnContextMethod · 0.45
RemoveGlobalPropertyMethod · 0.45

Calls 1

atomicDecMethod · 0.80

Tested by

no test coverage detected