<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 10.8.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "VideoToolbox",
  "identifier" : "/documentation/VideoToolbox/VTPixelTransferSessionInvalidate(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Video Toolbox"
    ],
    "preciseIdentifier" : "c:@F@VTPixelTransferSessionInvalidate"
  },
  "title" : "VTPixelTransferSessionInvalidate(_:)"
}
-->

# VTPixelTransferSessionInvalidate(_:)

Tears down a pixel transfer session.

```
func VTPixelTransferSessionInvalidate(_ session: VTPixelTransferSession)
```

## Parameters

`session`

The pixel transfer session to invalidate.

## Discussion

When you finish with a pixel transfer session you created, call this function to tear it down, and then call <doc://com.apple.documentation/documentation/CoreFoundation/CFRelease> to release your object reference.

> Note:
> A pixel transfer session is automatically invalidated when its retain count reaches zero, but because sessions may be retained by multiple parties, it’s hard to predict when the invalidation will happen.  Calling this function ensures a deterministic, orderly teardown.

---

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)