Instance Method

initWithBytes:deallocator:

Initializes a buffer map object to manage access to the specified memory.

Declaration

- (instancetype)initWithBytes:(void *)bytes deallocator:(void (^)(void))deallocator;

Parameters

bytes

A pointer to the data buffer to be managed by the buffer map.

deallocator

Model I/O calls this block when the buffer map object is deallocated. Use this block to unmap a shared buffer or perform other cleanup tasks.

The block has no parameters and no return value.

Return Value

A new buffer map object.