---
title: CGDataProviderReleaseBytePointerCallback
framework: coregraphics
role: symbol
role_heading: Type Alias
path: coregraphics/cgdataproviderreleasebytepointercallback
---

# CGDataProviderReleaseBytePointerCallback

A callback function that releases the pointer Core Graphics obtained by calling CGDataProviderGetBytePointerCallback.

## Declaration

```swift
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 doc://com.apple.coregraphics/documentation/CoreGraphics/CGDataProviderGetBytePointerCallback.

## Discussion

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.

## See Also

### Creating Direct-Access Data Providers

- [init(directInfo:size:callbacks:)](coregraphics/cgdataprovider/init(directinfo:size:callbacks:).md)
- [init(data:)](coregraphics/cgdataprovider/init(data:).md)
- [init(url:)](coregraphics/cgdataprovider/init(url:).md)
- [init(dataInfo:data:size:releaseData:)](coregraphics/cgdataprovider/init(datainfo:data:size:releasedata:).md)
- [init(filename:)](coregraphics/cgdataprovider/init(filename:).md)
- [CGDataProviderDirectCallbacks](coregraphics/cgdataproviderdirectcallbacks.md)
- [CGDataProviderGetBytePointerCallback](coregraphics/cgdataprovidergetbytepointercallback.md)
- [CGDataProviderGetBytesAtPositionCallback](coregraphics/cgdataprovidergetbytesatpositioncallback.md)
- [CGDataProviderReleaseInfoCallback](coregraphics/cgdataproviderreleaseinfocallback.md)
- [CGDataProviderReleaseDataCallback](coregraphics/cgdataproviderreleasedatacallback.md)
