Evaluate f()
and return its result, ensuring that x
is not
destroyed before f returns.
Declaration
func
withExtendedLifetime
<
T
,
Result
>
(
x
:
T
,
f
: @
noescape
() -
>
Result
) -
>
Result
Auto-generated documentation for Swift. Command-click no more.
Evaluate f()
and return its result, ensuring that x
is not
destroyed before f returns.
func
withExtendedLifetime
<
T
,
Result
>
(
x
:
T
,
f
: @
noescape
() -
>
Result
) -
>
Result
Evaluate
f(x)
and return its result, ensuring thatx
is not destroyed before f returns.Declaration
func
withExtendedLifetime
<
T
,
Result
>
(
x
:
T
,
f
: @
noescape
T
-
>
Result
) -
>
Result