Table of Contents

Method Reset

Namespace
Velvet
Assembly
Velvet.Docs.dll

Reset()

Resets state to the initial value. Non-virtual template method that short-circuits when the store has been disposed; concrete stores implement ResetCore().

public void Reset()

Remarks

During app shutdown / scene unload, VContainer disposes singletons LIFO, so a child store can be disposed before a parent store's Reset chain reaches it. The same disposal race also fires when V.Mount's UseEffect cleanup runs after the store has been disposed. Centralizing the guard here ensures every Store<TState> subclass — including those whose ResetCore() touches disposable internal resources — is automatically protected.