code: public synchronized void releaseMemory() {
  
      isReleasingMemory = true;
  
      userPhantomRefs.clear();
      cache.invalidateAll();
      scans.reset();
      source.releaseMemory();
      //loadedSubsets.clear();
  
      isReleasingMemory = false;
    }
docs: Releases all memory by calling {@link LCMSDataSource#releaseMemory() } and {@link
  IScanCollection#reset() }. Effectively, you get this object to the same state as it was after
  calling the constructor, however any ScanCollection configurations are preserved (e.g. spectra
  auto-loading) setting.
  <b>IMPORTANT: will clear the registry of loaded subsets without warning!</b>
  It's up to you to make sure you don't call this method while some component is still using the
  data.