So, instead of trying to defend against sloppy programming, why not just make sure that this is called in a the calculator's `clean_up` method, and test it?