| 1045 | } |
| 1046 | |
| 1047 | void 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 | |
| 1068 | bool Scripting::HasGameModulesLoaded() |
| 1069 | { |
nothing calls this directly
no test coverage detected