Managing resources#
Files, sockets, and response bodies need to close when you finish using them. Use with to register that close operation for the end of a block, including early returns and errors.
A reference keeps an object accessible; it does not keep a closed resource open. See mutation and references . Continue with files and paths for a concrete library API.