> home > Custom Layer Boundary API

managed_object_get_pointer

September 8th 2024
Get a pointer to he base of a managed object

Signature

C++
void*
managed_object_get_pointer(Application_Links* app,
                           Managed_Object object);

Parameters

app

the standard custom layer context pointer

object

the id of the managed object to query

Return

on success, when the object exists, a pointer to the base of the memory allocated for the object, otherwise zero

Details

Managed objects are essentially arrays with special management inside the core, such as markers. This call returns a pointer to base of the array. Careful! This pointer is a pointer to memory tied to a managed scope, so it can lose validity if the scope closes, and modifications to the memory at this pointer will be reflected throughout all systems relying on it.