uCalc API Version: 2.1.3-preview.2 Released: 6/17/2026

Warning

uCalc API Preview Release Notice:The documentation describes the intended behavior of the API. The current preview build contains incomplete features, unoptimized performance, and is subject to breaking changes.

MemoryObjectAddress

Method

Product: 

Fast Math Parser

Class: 

uCalcBase

Retrieves the internal handle of a uCalc object using its class type and memory index.

Syntax

MemoryObjectAddress(MemoryTable, int)

Parameters

objectType
MemoryTable
The type of object to look up, specified using a member of the [MemoryTable](/reference/enums/memorytable) enum.
index
int
The unique memory index of the object, typically obtained from an object's `MemoryIndex()` method. Index 0 is reserved for empty objects.

Return

int

The internal handle of the object at the specified index. Returns 0 if no object is found.

Remarks

The MemoryObjectAddress method is a low-level diagnostic tool used to retrieve an object's internal handle by using its stable memory index. It is primarily intended for advanced debugging and internal diagnostics.

Given an object's memory index (obtained from a method like Item.MemoryIndex()), this function returns the corresponding object Handle, which is an opaque identifier used internally by the uCalc library.

⚖️ Handle vs. Memory Index

It is critical to understand the difference between these two identifiers:

FeatureHandleMemory Index
StabilityVolatile. A handle's value is unpredictable and can change between application runs.Stable. Memory indices are predictable and generally sequential.
UniquenessGuaranteed unique for an object's lifetime.Can be recycled after an object is released.
PurposeLow-level object identification for the C++ core.High-level diagnostics and tracking object lifetime.

This function bridges the gap between the two, allowing you to find a volatile handle using a stable index.

Note: This is a static function and is not called on a uCalc instance.

Examples