mantidproject / mslice

Source code for Mantid MSlice
http://mantidproject.github.io/mslice
1 stars 1 forks source link

Remove deleted hidden workspaces from ADS #960

Closed SilkeSchomann closed 7 months ago

SilkeSchomann commented 8 months ago

Description of work:

The cut algorithm creates hidden workspaces specific to a cut that are now also removed from the ADS once this cut is deleted to avoid memory issues when working with many cuts.

To test:

Follow instructions in https://github.com/mantidproject/mslice/issues/924 for testing. At the moment, only hidden workspaces linked to a specific cut are removed, not all hidden workspaces.

Fixes #924

robertapplin commented 8 months ago

I followed the instructions but it looks like the hidden workspace still exists even after deleting the cut workspace. I did this before and after deleting the cut workspace in the IPython window, and it is successful both times. I would have expected it to fail to find the hidden workspace after the deletion of the cut workspace

from mantid.api import AnalysisDataService

ws = AnalysisDataService.retrieve("__MSLMARI28540_80meV_cut(-5.000,5.000)")