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:
Returns a stable, predictable index for the object, useful for diagnostics and tracking object lifecycles.
The MemoryIndex method returns a stable, predictable integer that uniquely identifies an object within its class for the duration of its lifetime. It is primarily a tool for advanced debugging, diagnostics, and tracking object lifecycles.
MemoryIndex is assigned sequentially. The first Item created will have index 1, the second will have index 2, and so on..Release()), its MemoryIndex is returned to a pool and will be reused by the next object of the same type that is created. This is a key behavior to understand when debugging.MemoryIndex vs. HandleIt is crucial to distinguish MemoryIndex from an object's Handle.
| Feature | MemoryIndex | Handle |
|---|---|---|
| Stability | Stable & Predictable. Sequential integers. | Volatile. A memory address that changes between runs. |
| Uniqueness | Unique for its lifetime, but recycled after release. | Guaranteed unique for the object's lifetime. Never recycled. |
| Purpose | High-level diagnostics, logging, lifecycle tracking. | Low-level object identification for the C++ core. |
| Use Case | "Is this the same object slot I saw before?" | "What is the exact memory reference for this object?" |
GetHashCode(): While GetHashCode() provides an integer, it is not guaranteed to be unique, nor is it stable between application runs. MemoryIndex is deterministic and predictable within a single run.Handle. MemoryIndex provides a higher-level, more stable identifier that is independent of memory layout.The MemoryIndex gives developers a reliable tool for introspection that bridges the gap between low-level memory addresses and high-level object references.