CClosureRef

public struct CClosureRef : CClosureProtocol

The CClosureRef type acts as a lightweight Swift reference to an underlying GCClosure instance. It exposes methods that can operate on this data type through CClosureProtocol conformance. Use CClosureRef only as an unowned reference to an existing GCClosure instance.

A GCClosure is a specialization of GClosure for C function callbacks.

  • ptr
    Untyped pointer to the underlying `GCClosure` instance.
    

    For type-safe access, use the generated, typed pointer _ptr property instead.

    Declaration

    Swift

    public let ptr: UnsafeMutableRawPointer

CClosure Record