def cleanup(self): ''' Cleanup various resources. ''' if self.proj: self.proj.deactivate() if self.projdirfactory: self.projdirfactory.cleanup() remove_class_factory(self.projdirfactory) if self.files: self.files.cleanup()