Function swift_runtime_sys::root::swift::swift_deallocClassInstance
source · pub unsafe extern "C" fn swift_deallocClassInstance(
object: *mut HeapObject,
allocatedSize: usize,
allocatedAlignMask: usize,
)
Expand description
Deallocate the given memory.
It must have been returned by swift_allocObject, possibly used as an Objective-C class instance, and the strong reference must have the RC_DEALLOCATING_FLAG flag set, but otherwise the object is in an unknown state.
\param object - never null \param allocatedSize - the allocated size of the object from the program’s perspective, i.e. the value \param allocatedAlignMask - the alignment requirement that was passed to allocObject
POSSIBILITIES: It may be useful to have a variant which requires the object to have been fully zeroed from offsets sizeof(SwiftHeapObject) to allocatedSize.