Evaluates a closure while ensuring that the given instance is not destroyed before the closure returns.
- Xcode 7.0+
- Swift Standard Library
An instance to preserve until the execution of
A closure to execute that depends on the lifetime of
xbeing extended. If
bodyhas a return value, that value is also used as the return value for the
Extended Lifetime(_: _:)
The return value, if any, of the
body closure parameter.