Convert Runtime.GetClass to use GCHandle.
This commit is contained in:
Родитель
c25403bb21
Коммит
ef92c04135
|
@ -89,7 +89,7 @@
|
|||
OnlyDynamicUsage = true,
|
||||
},
|
||||
|
||||
new XDelegate ("MonoObject *", "IntPtr", "xamarin_get_class",
|
||||
new XDelegate ("GCHandle->MonoObject *", "IntPtr", "xamarin_get_class",
|
||||
"Class", "IntPtr", "ptr"
|
||||
) {
|
||||
WrappedManagedFunction = "GetClass",
|
||||
|
|
|
@ -628,7 +628,7 @@ namespace ObjCRuntime {
|
|||
|
||||
static IntPtr GetClass (IntPtr klass)
|
||||
{
|
||||
return ObjectWrapper.Convert (new Class (klass));
|
||||
return AllocGCHandle (new Class (klass));
|
||||
}
|
||||
|
||||
static IntPtr GetSelector (IntPtr sel)
|
||||
|
|
Загрузка…
Ссылка в новой задаче