MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / OnManagedInstanceDeleted

Method OnManagedInstanceDeleted

Source/Engine/Scripting/Scripting.cpp:1047–1066  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1045}
1046
1047void Scripting::OnManagedInstanceDeleted(ScriptingObject* obj)
1048{
1049 PROFILE_CPU();
1050 ASSERT(obj);
1051
1052 // Validate if object still exists
1053 _objectsLocker.Lock();
1054 if (_objectsDictionary.ContainsValue(obj))
1055 {
1056#if USE_OBJECTS_DISPOSE_CRASHES_DEBUGGING
1057 LOG(Info, "[OnManagedInstanceDeleted] obj = 0x{0:x}, {1}", (uint64)obj, String(ScriptingObjectData(obj).TypeName));
1058#endif
1059 obj->OnManagedInstanceDeleted();
1060 }
1061 else
1062 {
1063 //LOG(Warning, "Object finalization called for already removed object (address={0:x})", (uint64)obj);
1064 }
1065 _objectsLocker.Unlock();
1066}
1067
1068bool Scripting::HasGameModulesLoaded()
1069{

Callers

nothing calls this directly

Calls 5

ScriptingObjectDataClass · 0.85
LockMethod · 0.80
UnlockMethod · 0.80
StringFunction · 0.50
ContainsValueMethod · 0.45

Tested by

no test coverage detected