<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTL4CounterHeap/invalidateCounterRange(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "s:So15MTL4CounterHeapP5MetalE010invalidateB5RangeyySnySiGF"
  },
  "title" : "invalidateCounterRange(_:)"
}
-->

# invalidateCounterRange(_:)

Invalidates a range of entries in this counter heap.

```
func invalidateCounterRange(_ range: Range<Int>)
```

## Parameters

`range`

A heap index range to invalidate.

## Discussion

The effect of this call is immediate on the CPU timeline. You are responsible for ensuring that this counter heap is not currently in use on the GPU.

> Note: Invalidated entries produce 0 when resolved.

---

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)