title: How to write a class destructor in Scala?
body: <p>I'd like to have a FileWriter opened during the whole time a class instance exists. So I need to close it in a destructor. But how to specify a destructor in Scala?</p>