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

# CGDataProviderReleaseDataCallback

A callback function that releases data you supply to the function [`init(dataInfo:data:size:releaseData:)`](/documentation/CoreGraphics/CGDataProvider/init(dataInfo:data:size:releaseData:)).

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

## Parameters

`info`

A generic pointer to private data shared among your callback functions. This is the same pointer you supplied to [`init(dataInfo:data:size:releaseData:)`](/documentation/CoreGraphics/CGDataProvider/init(dataInfo:data:size:releaseData:)).

`data`

A pointer to your provider data.

`size`

The size of the data.

## 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.

---

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)