1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Mono/C#: Add error checks to detect possible Reference leaks

This commit is contained in:
Ignacio Etcheverry
2020-01-13 21:00:07 +01:00
parent ea737db43c
commit a6a5ef0fd6
5 changed files with 51 additions and 4 deletions

View File

@@ -307,6 +307,11 @@ class CSharpLanguage : public ScriptLanguage {
Map<Object *, CSharpScriptBinding> script_bindings;
#ifdef DEBUG_ENABLED
// List of unsafely referenced objects
List<ObjectID> unsafely_referenced_objects;
#endif
struct StringNameCache {
StringName _signal_callback;
@@ -458,6 +463,9 @@ public:
Vector<StackInfo> stack_trace_get_info(MonoObject *p_stack_trace);
#endif
void post_unsafe_reference(Object *p_obj);
void pre_unsafe_unreference(Object *p_obj);
CSharpLanguage();
~CSharpLanguage();
};