Properly handle Kotlin from Objective-C allocations. (#2934)
This commit is contained in:
@@ -169,9 +169,9 @@ static void initializeObjCExport();
|
|||||||
format:@"%s must be allocated and initialized with a factory method",
|
format:@"%s must be allocated and initialized with a factory method",
|
||||||
class_getName(object_getClass(self))];
|
class_getName(object_getClass(self))];
|
||||||
}
|
}
|
||||||
|
ObjHolder holder;
|
||||||
AllocInstanceWithAssociatedObject(typeInfo, result, result->refHolder.slotToInit());
|
AllocInstanceWithAssociatedObject(typeInfo, result, holder.slot());
|
||||||
|
UpdateHeapRef(result->refHolder.slotToInit(), holder.obj());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user