[Mac] Added objc_disposeClassPair binding

This commit is contained in:
thefiddler 2014-07-22 16:29:37 +02:00
parent 0e40f63cf2
commit 5501689d37

View file

@ -55,6 +55,9 @@ namespace OpenTK.Platform.MacOS
[DllImport (Cocoa.LibObjC)]
extern static void objc_registerClassPair(IntPtr classToRegister);
[DllImport (Cocoa.LibObjC)]
extern static void objc_disposeClassPair(IntPtr cls);
public static IntPtr Get(string name)
{
var id = objc_getClass(name);
@ -75,6 +78,11 @@ namespace OpenTK.Platform.MacOS
objc_registerClassPair(handle);
}
public static void DisposeClass(IntPtr handle)
{
objc_disposeClassPair(handle);
}
static List<Delegate> storedDelegates = new List<Delegate>();
public static void RegisterMethod(IntPtr handle, Delegate d, string selector, string typeString)