uCalc API Version: 5.7.0-preview.1 Released: 7/30/2026
Warning
uCalc API Preview Release Notice:This preview documentation describes the intended behavior of the API. It is not fully accurate or complete.The current preview build contains incomplete features, unoptimized performance, and is subject to breaking changes.Use of the preview version in your production code is not recommended.
Product:
Class:
Resets the entire uCalc library to its initial startup state, releasing all instances and clearing all definitions.
This method does not return a value.
The static ResetAll() method is a global, application-wide function that restores the uCalc library to its pristine, out-of-the-box state. It is a powerful tool for ensuring a clean environment, particularly in testing scenarios or applications with complex, dynamic configurations.
ResetAll DoesCalling this function performs the following actions:
uCalc instance created during the application's lifetime is released, freeing all associated memory.ResetAllResetAll is the most comprehensive cleanup tool and should be used when you need to guarantee a completely fresh start. Common use cases include:
ResetAll() in the TearDown or afterEach method of a test suite to ensure that each test runs in a perfectly isolated environment, free from any state created by previous tests.ResetAll can power a "Reset to Factory Defaults" feature.ResetAll vs. Other Reset MethodsIt is crucial to choose the correct cleanup method for your needs. ResetAll is the most powerful and destructive option.
| Method | Scope | Effect |
|---|---|---|
ResetAll() | Global (Library-wide) | Destroys all uCalc instances and resets the entire library. |
| DefaultClear() | Default Instance Stack | Removes all custom default instances and resets only the original, root default instance. Other instances are unaffected. |
instance.Release() | Single Instance | Releases one specific uCalc instance and its associated resources. |
⚠️ Warning: Because ResetAll() affects the entire application, use it with care. Calling it will invalidate all existing uCalc object handles, including any that may still be in scope.