<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreVideo",
  "identifier" : "/documentation/CoreVideo/CVMutablePixelBuffer/Pool/AllocationAttributes/allocationThreshold",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core Video"
    ],
    "preciseIdentifier" : "s:9CoreVideo20CVMutablePixelBufferV4PoolC20AllocationAttributesV19allocationThresholdSiSgvp"
  },
  "title" : "allocationThreshold"
}
-->

# allocationThreshold

A new pixel buffer will not be allocated if the pool already has this many or more pixel buffers allocated. This
does not prevent already-allocated buffers from being recycled. If this causes allocation failure, then
`CVMutablePixelBuffer/Pool/mutablePixelBuffer(allocationThreshold:)` throws
[`wouldExceedAllocationThreshold`](/documentation/CoreVideo/CVError/wouldExceedAllocationThreshold).

```
var allocationThreshold: Int?
```

---

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)