Contents

getBytesNoCopy()

Returns a pointer to the OSData object's internal data buffer.

Declaration

virtual const void * getBytesNoCopy() const;

Return Value

A pointer to the OSData object's internal data buffer.

Overview

You can modify the existing contents of an OSData object via this function. It works with OSData objects that have their own data buffers as well as with OSData objects that have shared buffers.

If you append bytes or characters to an OSData object, it may have to reallocate its internal storage, rendering invalid an extrated pointer to that storage.

See Also

Miscellaneous