---
title: alwaysCopiesSampleData
framework: avfoundation
role: symbol
role_heading: Instance Property
path: avfoundation/avassetreaderoutput/alwayscopiessampledata
---

# alwaysCopiesSampleData

A Boolean value that indicates whether the output vends copied sample data.

## Declaration

```swift
var alwaysCopiesSampleData: Bool { get set }
```

## Discussion

Discussion The default value is true, which indicates that the output always provides copies of sample data to your app. This is the appropriate property value if you intend to modify the sample data it returns. You can disable the default behavior by setting the value to false, which causes the output to vend buffers that may not be copies. Your app can reference these buffers, but it can’t modify them because the result of modifying a shared buffer isn’t defined. If you don’t need to modify the sample data, disabling copying may lead to performance improvements.

## See Also

### Configuring reading

- [supportsRandomAccess](avfoundation/avassetreaderoutput/supportsrandomaccess.md)
- [reset(forReadingTimeRanges:)](avfoundation/avassetreaderoutput/reset(forreadingtimeranges:).md)
- [markConfigurationAsFinal()](avfoundation/avassetreaderoutput/markconfigurationasfinal().md)
