From f88d8902cfc0d6a9441e794eb47611ef4ed0d46c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ignacio=20Rold=C3=A1n=20Etcheverry?= Date: Tue, 28 Dec 2021 23:25:16 +0100 Subject: C#: Ensure native handles are freed after switch to .NET Core Finalizers are longer guaranteed to be called on exit now that we switched to .NET Core. This results in native instances leaking. The only solution I can think of so far is to keep a list of all instances alive to dispose when the AssemblyLoadContext.Unloading event is raised. --- modules/mono/godotsharp_defs.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'modules/mono/godotsharp_defs.h') diff --git a/modules/mono/godotsharp_defs.h b/modules/mono/godotsharp_defs.h index 872c875cbe..a81a52e4b8 100644 --- a/modules/mono/godotsharp_defs.h +++ b/modules/mono/godotsharp_defs.h @@ -33,15 +33,10 @@ #define BINDINGS_NAMESPACE "Godot" #define BINDINGS_NAMESPACE_COLLECTIONS BINDINGS_NAMESPACE ".Collections" -#define BINDINGS_NAMESPACE_BRIDGE BINDINGS_NAMESPACE ".Bridge" -#define BINDINGS_GLOBAL_SCOPE_CLASS "GD" -#define BINDINGS_PTR_FIELD "NativePtr" -#define BINDINGS_NATIVE_NAME_FIELD "NativeName" #define API_SOLUTION_NAME "GodotSharp" #define CORE_API_ASSEMBLY_NAME "GodotSharp" #define EDITOR_API_ASSEMBLY_NAME "GodotSharpEditor" #define TOOLS_ASM_NAME "GodotTools" -#define TOOLS_PROJECT_EDITOR_ASM_NAME "GodotTools.ProjectEditor" #define BINDINGS_CLASS_NATIVECALLS "NativeCalls" #define BINDINGS_CLASS_NATIVECALLS_EDITOR "EditorNativeCalls" -- cgit v1.2.3