Convert Runtime.GetClass to use GCHandle.

This commit is contained in:
Rolf Bjarne Kvinge 2020-05-04 11:08:32 +02:00
Родитель c25403bb21
Коммит ef92c04135
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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)