Enumeration

Data.Deallocator

A deallocator you use to customize how the backing store is deallocated for data created with the no-copy initializer.

Declaration

enum Data.Deallocator

Topics

Enumeration Cases

See Also

Creating Data from Raw Memory

init(bytes: UnsafeRawPointer, count: Int)

Creates data with copied memory content.

init<SourceType>(buffer: UnsafeBufferPointer<SourceType>)

Creates a data buffer with copied memory content using a buffer pointer.

init<SourceType>(buffer: UnsafeMutableBufferPointer<SourceType>)

Creates a data buffer with copied memory content using a mutable buffer pointer.

init(bytesNoCopy: UnsafeMutableRawPointer, count: Int, deallocator: Data.Deallocator)

Creates a data buffer with memory content without copying the bytes.