<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMedia",
  "identifier" : "/documentation/CoreMedia/CMBlockBuffer/Slice",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Core Media",
      "CoreMedia"
    ],
    "preciseIdentifier" : "s:So16CMBlockBufferRefa9CoreMediaE5SliceV"
  },
  "title" : "CMBlockBuffer.Slice"
}
-->

# CMBlockBuffer.Slice

A slice of a `CMBlockBuffer` instance.

```
struct Slice
```

## Overview> Important: Long-term storage of `CMBlockBuffer.Slice` instances is
> discouraged. A slice holds a reference to the entire storage of a larger
> block buffer, not just to the portion it presents, even after the original
> buffer’s lifetime ends. Long-term storage of a slice may therefore prolong
> the lifetime of bytes that are no longer otherwise accessible, which can
> appear to be memory and object leakage.

## Relationships

### Conforms To

[`Escapable`](/documentation/Swift/Escapable)

[`CMBlockBufferProtocol`](/documentation/CoreMedia/CMBlockBufferProtocol)

[`Copyable`](/documentation/Swift/Copyable)

---

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)