Function releaseSnapshotStore

  • Parameters

    • Optional className: string

      name of the mocked class to release

    Returns void

    Description

    Releases the snapshot store(s) for a given class name, freeing their in-memory call/string/value pools so they can be garbage-collected. The released store(s) are also removed from the global registry; if needed again they are re-created and lazily re-loaded from disk on the next getSnapshotStore. No-op when className is absent or no store exists for it.

    Call this between host test files to bound memory in a long-running worker (e.g. vitest isolate: false). Make sure data has been flushed first.