Class CustomGCHandle
- Namespace
- Godot
- Assembly
- GodotSharp.dll
Provides a GCHandle that becomes weak when unloading the assembly load context, without having to manually replace the GCHandle. This hides all the complexity of releasing strong GC handles to allow the assembly load context to unload properly.
Internally, a strong CustomGCHandle actually contains a weak GCHandle, while the actual strong reference is stored in a static table.
public static class CustomGCHandle
- Inheritance
-
CustomGCHandle
- Inherited Members
Methods
AllocStrong(object)
public static GCHandle AllocStrong(object value)
Parameters
value
object
Returns
AllocStrong(object, Type)
public static GCHandle AllocStrong(object value, Type valueType)
Parameters
Returns
AllocWeak(object)
public static GCHandle AllocWeak(object value)
Parameters
value
object
Returns
Free(GCHandle)
public static void Free(GCHandle handle)
Parameters
handle
GCHandle
IsAlcBeingUnloaded(AssemblyLoadContext)
public static bool IsAlcBeingUnloaded(AssemblyLoadContext alc)