WeakRef

public class WeakRef<T> where T : AnyObject

Swift object that holds a weak reference to an Object like its Java counter-part WeakReference.

  • The weak referenced object

    Declaration

    Swift

    public private(set) weak var value: T? { get }
  • Initialize a weak reference.

    Declaration

    Swift

    public required init(_ obj: T)

    Parameters

    obj

    the object to weak reference