我想在 an 中存储弱引用,NSPointerArray
但出现错误:
public var objectWithReloadFRC = NSPointerArray(options: NSPointerFunctionsWeakMemory)
objectWithReloadFRC.addPointer(self) //self is an UIViewController subclass
也试过这个:
objectWithReloadFRC.addPointer(UnsafePointer(self)