<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreGraphics",
  "identifier" : "/documentation/CoreGraphics/CGDataProviderReleaseBytePointerCallback",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "Core Graphics"
    ],
    "preciseIdentifier" : "c:@T@CGDataProviderReleaseBytePointerCallback"
  },
  "title" : "CGDataProviderReleaseBytePointerCallback"
}
-->

# CGDataProviderReleaseBytePointerCallback

A callback function that releases the pointer Core Graphics obtained by calling [`CGDataProviderGetBytePointerCallback`](/documentation/CoreGraphics/CGDataProviderGetBytePointerCallback).

```
typealias CGDataProviderReleaseBytePointerCallback = (UnsafeMutableRawPointer?, UnsafeRawPointer) -> Void
```

## Parameters

`info`

A generic pointer to private data shared among your callback functions.  This is the same pointer you supplied to `CGDataProviderCreateDirectAccess`.

`pointer`

A pointer to your provider data. This is the same pointer you returned in [`CGDataProviderGetBytePointerCallback`](/documentation/CoreGraphics/CGDataProviderGetBytePointerCallback).

## Discussion

When Core Graphics no longer needs direct access to your provider data, your function is called. You may safely modify, move, or release your provider data at this time.

For information on how to associate your function with a direct-access data provider, see `CGDataProviderCreateDirectAccess` and `CGDataProviderDirectAccessCallbacks`.

---

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)