Contents

CGDataProviderReleaseDataCallback

A callback function that releases data you supply to the function Init(datainfo:data:size:releasedata:).

Declaration

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:).

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

See Also

Creating Direct-Access Data Providers