mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-02-24 04:26:57 +00:00
[Mac] Removed stored delegate list
The stored delegate list would store delegates indefinitely, causing a memory leak. It is now the responsibility of each class to maintain references to any callback functions it defines.
This commit is contained in:
parent
8f30f77b30
commit
29af70274d
|
@ -83,8 +83,6 @@ namespace OpenTK.Platform.MacOS
|
|||
objc_disposeClassPair(handle);
|
||||
}
|
||||
|
||||
static List<Delegate> storedDelegates = new List<Delegate>();
|
||||
|
||||
public static void RegisterMethod(IntPtr handle, Delegate d, string selector, string typeString)
|
||||
{
|
||||
// TypeString info:
|
||||
|
@ -97,8 +95,6 @@ namespace OpenTK.Platform.MacOS
|
|||
{
|
||||
throw new ArgumentException("Could not register method " + d + " in class + " + class_getName(handle));
|
||||
}
|
||||
|
||||
storedDelegates.Add(d); // Don't let the garbage collector eat our delegates.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue