objc_storeWeak(_:_:)
Stores a new value in a __weak variable.
Declaration
func objc_storeWeak(_ location: AutoreleasingUnsafeMutablePointer<AnyObject?>, _ obj: Any?) -> Any?Parameters
- location:
The address of the weak pointer.
- obj:
The new object you want the weak pointer to now point to.
Return Value
The value stored in location (that is, obj).
Discussion
This function is typically used anywhere a __weak variable is the target of an assignment.