Defer Statement
Defers evaluation of expression
(the body) until control leaves the enclosing block expression. 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.
Last updated