<!--
{
  "documentType" : "article",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/managed-buffers",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Managed Buffers"
}
-->

# Managed Buffers

Build your own buffer-backed collection types.

## Topics

### Buffer Implementation

[`class ManagedBuffer`](/documentation/Swift/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.

[`struct ManagedBufferPointer`](/documentation/Swift/ManagedBufferPointer)

Contains 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 isKnownUniquelyReferenced<T>(inout T?) -> Bool`](/documentation/Swift/isKnownUniquelyReferenced(_:)-98zpp)

Returns a Boolean value indicating whether the given object is known to
have a single strong reference.

[`func isKnownUniquelyReferenced<T>(inout T) -> Bool`](/documentation/Swift/isKnownUniquelyReferenced(_:)-5kvtu)

Returns a Boolean value indicating whether the given object is known to
have a single strong reference.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)