---
title: kCVPixelBufferIOSurfacePurgeableKey
framework: corevideo
role: symbol
role_heading: Global Variable
path: corevideo/kcvpixelbufferiosurfacepurgeablekey
---

# kCVPixelBufferIOSurfacePurgeableKey

## Declaration

```swift
let kCVPixelBufferIOSurfacePurgeableKey: CFString
```

## Discussion

Discussion Key sets the IOSurface backed memory allocation for CVPixelBuffer as purgeable and non-volatile. A purgeable IOSurface is capable of being switched between non-volatile, volatile and empty states using IOSurfaceSetPurgeable.  When in the volatile state, the OS is permitted to instantly change its state to empty and remove all its memory pages.  Clients should set the IOSurfaces to the non-volatile state while they are in use and the volatile state when their need and contents is optional/speculative and OK to discard in response to system memory demand.  See IOSurfaceSetPurgeable for more details.  This key is only effective for CVPixelBuffers that are backed by IOSurface.

## See Also

### Constants

- [kCVPixelBufferMemoryAllocatorKey](corevideo/kcvpixelbuffermemoryallocatorkey.md)
- [kCVPixelBufferPixelFormatTypeKey](corevideo/kcvpixelbufferpixelformattypekey.md)
- [kCVPixelBufferWidthKey](corevideo/kcvpixelbufferwidthkey.md)
- [kCVPixelBufferHeightKey](corevideo/kcvpixelbufferheightkey.md)
- [kCVPixelBufferExtendedPixelsLeftKey](corevideo/kcvpixelbufferextendedpixelsleftkey.md)
- [kCVPixelBufferExtendedPixelsTopKey](corevideo/kcvpixelbufferextendedpixelstopkey.md)
- [kCVPixelBufferExtendedPixelsRightKey](corevideo/kcvpixelbufferextendedpixelsrightkey.md)
- [kCVPixelBufferExtendedPixelsBottomKey](corevideo/kcvpixelbufferextendedpixelsbottomkey.md)
- [kCVPixelBufferBytesPerRowAlignmentKey](corevideo/kcvpixelbufferbytesperrowalignmentkey.md)
- [kCVPixelBufferCGBitmapContextCompatibilityKey](corevideo/kcvpixelbuffercgbitmapcontextcompatibilitykey.md)
- [kCVPixelBufferCGImageCompatibilityKey](corevideo/kcvpixelbuffercgimagecompatibilitykey.md)
- [kCVPixelBufferOpenGLCompatibilityKey](corevideo/kcvpixelbufferopenglcompatibilitykey.md)
- [kCVPixelBufferPlaneAlignmentKey](corevideo/kcvpixelbufferplanealignmentkey.md)
- [kCVPixelBufferIOSurfacePropertiesKey](corevideo/kcvpixelbufferiosurfacepropertieskey.md)
- [kCVPixelBufferOpenGLESCompatibilityKey](corevideo/kcvpixelbufferopenglescompatibilitykey.md)
