GWeak

@propertyWrapper
public final class GWeak<T> where T : GWeakCapturing, T : ObjectProtocol

Storage for weak references of GObject reference counting. Use only unowning wrappers as a generic parameter T.

  • Safe public inteface required by the PropertyWrapper. The storage is always optional due to nature of weak references.

    Declaration

    Swift

    public var wrappedValue: T? { get set }
  • Initializer required by the property wrapper.

    Declaration

    Swift

    public init(wrappedValue: T?)
  • Convenience init with ommited label.

    Declaration

    Swift

    public convenience init(_ other: T?)