---
title: CMBlockBuffer.Slice
framework: coremedia
role: symbol
role_heading: Structure
path: coremedia/cmblockbuffer/slice
---

# CMBlockBuffer.Slice

A slice of a CMBlockBuffer instance.

## Declaration

```swift
struct Slice
```

## Overview

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

- [CMBlockBufferProtocol](coremedia/cmblockbufferprotocol.md)
- [Copyable](swift/copyable.md)
- [Escapable](swift/escapable.md)

## See Also

### Data Types

- [CMBlockBuffer.Error](coremedia/cmblockbuffer/error.md)
- [CMBlockBuffer.Flags](coremedia/cmblockbuffer/flags.md)
