---
title: size
framework: coremedia
role: symbol
role_heading: Instance Property
path: coremedia/cmsamplebuffer/sampleproperties/size
---

# size

Size in bytes of the sample.

## Declaration

```swift
var size: Int?
```

## Discussion

Discussion The size of the sample is only applicable for buffers carrying data blocks. For pixel buffers and tagged buffers, the size should be set to nil.
