Contents

mutableBytes

A pointer to the data contained by the mutable data object.

Declaration

var mutableBytes: UnsafeMutableRawPointer { get }

Discussion

If the length of the receiver’s data is not zero, this property is guaranteed to contain a pointer to the object’s internal bytes. If the length of receiver’s data is zero, this property may or may not contain NULL dependent upon many factors related to how the object was created (moreover, in this case the method result might change between different releases). The returned pointer is valid until the data object is deallocated.

A sample using this method can be found in Working With Mutable Binary Data.

See Also

Related Documentation