h2/src/main/org/h2/mvstore/MVMap.java
/**
     * Forget those old versions that are no longer needed.
     */
Forget those old versions that are no longer needed.
Forget those old versions that are no longer needed .
void removeUnusedOldVersions() {
        long oldest = store.getOldestVersionToKeep();
        if (oldest == -1) {
            return;
        }
        int i = searchRoot(oldest);
        if (i < 0) {
            i = -i - 1;
        }
        i--;
        if (i <= 0) {
            return;
        }
        int size = oldRoots.size() - i;
        ArrayList<Page> list = new ArrayList<Page>(size);
        list.addAll(oldRoots.subList(i, oldRoots.size()));
        oldRoots = list;
    }
void removeUnusedOldVersions ( ) { long oldest = store . getOldestVersionToKeep ( ) ; if ( oldest == - 1 ) { return ; } int i = searchRoot ( oldest ) ; if ( i < 0 ) { i = - i - 1 ; } i -- ; if ( i <= 0 ) { return ; } int size = oldRoots . size ( ) - i ; ArrayList < Page > list = new ArrayList < Page > ( size ) ; list . addAll ( oldRoots . subList ( i , oldRoots . size ( ) ) ) ; oldRoots = list ; }
Forget those old versions that are no longer needed.
Forget those old versions that are no longer needed .
// create a new instance // because another thread might iterate over it