Lexically scoped resource management
