Contents

ManagedBuffer

A class whose instances contain a property of type Header and raw storage for an array of Element, whose size is determined at instance creation.

Declaration

class ManagedBuffer<Header, Element> where Element : ~Copyable

Overview

Note that the Element array is suitably-aligned raw memory. You are expected to construct and—if necessary—destroy objects there yourself, using the APIs on UnsafeMutablePointer<Element>. Typical usage stores a count and capacity in Header and destroys any live elements in the deinit of a subclass.

Topics

Instance Properties

Instance Methods

Type Methods

See Also

Buffer Implementation