From twitter:
objc_constructInstance(…) might let you do what you want...
From <objc/runtime.h>
:
/**
* Creates an instance of a class at the specific location provided.
*
* @param cls The class that you wish to allocate an instance of.
* @param bytes The location at which to allocate an instance of \e cls.
* Must point to at least \c class_getInstanceSize(cls) bytes of well-aligned,
* zero-filled memory.
*
* @return \e bytes on success, \c nil otherwise. (For example, \e cls or \e bytes
* might be \c nil)
*
* @see class_createInstance
*/
OBJC_EXPORT id objc_constructInstance(Class cls, void *bytes)
__OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0)
OBJC_ARC_UNAVAILABLE;
It looks like objc_constructInstance
is the answer.