Build your own buffer-backed collection types.
Managed Buffers
Topics
Buffer Implementation
class Managed BufferA class whose instances contain a property of type Header and raw storage for an array of Element, whose size is determined at instance creation.
struct Managed Buffer PointerContains a buffer object, and provides access to an instance of Header and contiguous storage for an arbitrary number of Element instances stored in that buffer.
Uniqueness Checking
func is Known Uniquely Referenced<T>(inout T?) -> BoolReturns a Boolean value indicating whether the given object is known to have a single strong reference.
func is Known Uniquely Referenced<T>(inout T) -> BoolReturns a Boolean value indicating whether the given object is known to have a single strong reference.
See Also
Advanced Collection Topics
Sequence and Collection Protocols
Write generic code that works with any collection, or build your own collection types.
Supporting Types
Use wrappers, indices, and iterators in operations like slicing, flattening, and reversing a collection.