using System.Runtime.InteropServices;
using System;
+using System.Collections.Generic;
namespace OpenTK.Platform.MacOS
{
objc_registerClassPair(handle);
}
+ static List<Delegate> storedDelegates = new List<Delegate>();
+
public static void RegisterMethod(IntPtr handle, Delegate d, string selector, string typeString)
{
// TypeString info:
{
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.
}
}
}