You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-18 14:21:41 +00:00
Mono/C#: Lighten up unsafe reference checks
Because of the weird case with multi-threading and ResourceLoader, it can be the case that a resource is GCed while being referenced again in the main thread. In such cases, a new unsafe reference is created before the finalizer thread removes the previous one.
This commit is contained in:
@@ -308,8 +308,9 @@ class CSharpLanguage : public ScriptLanguage {
|
||||
Map<Object *, CSharpScriptBinding> script_bindings;
|
||||
|
||||
#ifdef DEBUG_ENABLED
|
||||
// List of unsafely referenced objects
|
||||
List<ObjectID> unsafely_referenced_objects;
|
||||
// List of unsafe object references
|
||||
Map<ObjectID, int> unsafe_object_references;
|
||||
Mutex *unsafe_object_references_lock;
|
||||
#endif
|
||||
|
||||
struct StringNameCache {
|
||||
|
||||
Reference in New Issue
Block a user