@ Override public void destroyAllWorkspacesForCurrentThread ( ) { ensureThreadExistense ( ) ; List < MemoryWorkspace > workspaces = new ArrayList <> ( ) ; workspaces . addAll ( backingMap . get ( ) . values ( ) ) ; for ( MemoryWorkspace workspace : workspaces ) { destroyWorkspace ( workspace ) ; } System . gc ( ) ; }
This method destroys all workspaces allocated in current thread