diff --git a/oct2py/core.py b/oct2py/core.py index 8757436e..a8c36c7f 100644 --- a/oct2py/core.py +++ b/oct2py/core.py @@ -100,6 +100,10 @@ def __exit__(self, type, value, traceback): """Close session""" self.exit() + def __del__(self): + """Delete session""" + self.exit() + def exit(self): """Quits this octave session and cleans up. """