Defer Statement
Last updated
Last updated
Defers evaluation of (the body) until control leaves the enclosing . Multiple defer
statements are evaluated in reverse lexical order.
defer
statements are typically used to reliably clean up resources regardless of how control leaves a block expression.