diff --git a/invesalius/data/mask.py b/invesalius/data/mask.py index 9988aa6..2212396 100644 --- a/invesalius/data/mask.py +++ b/invesalius/data/mask.py @@ -291,3 +291,4 @@ class Mask(): def __del__(self): if self.is_shown: self.history._config_undo_redo(False) + os.remove(self.temp_file) diff --git a/invesalius/data/slice_.py b/invesalius/data/slice_.py index 8c8d812..805259d 100644 --- a/invesalius/data/slice_.py +++ b/invesalius/data/slice_.py @@ -243,6 +243,9 @@ class Slice(object): def CloseProject(self): self.imagedata = None + f = self._matrix.filename + self._matrix = None + os.remove(f) self.current_mask = None self.values = None -- libgit2 0.21.2