class_createInstance
Creates an instance of a class, allocating memory for the class in the default malloc memory zone.
objc_destructInstance
Destroys an instance of a class without freeing memory and removes any of its associated references.
Availability
Technology
id objc_constructInstance(Class cls, void *bytes);
cls
The class that you want to allocate an instance of.
bytes
The location at which to allocate an instance of the cls
class. bytes
must point to at least class
bytes of well-aligned, zero-filled memory.
An instance of the class cls
at bytes
, if successful; otherwise nil
(for example, if cls
or bytes
are themselves nil
).
class_createInstance
objc_destructInstance