What is the recommended way to close resources?

Technical