PathEngine home | previous: | next: |
Enables a custom allocation strategy to be supplied for PathEngine internal allocations (default allocator).
extern "C" { void PathEngine_SetDefaultAllocator(iAllocator* allocator); } |
allocator | A pointer to an object inheriting from the iAllocator interface, which PathEngine will call for memory allocations. |
This function is for use when statically linking against the SDK.
(Pass an allocator pointer into
This function can only be called
The pointed to allocator object must then remain valid either until PathEngine is explicitly shut down,
or until global or static object destruction time.
It is ok for the allocator object to be declared as a global (or static) scoped object,
since PathEngine does not allocate memory from any global (or static) objects internally.
Explicit shutdown with PathEngine_ShutDown() is necessary if you want to ensure that each allocation is matched with a call to free(), i.e. with leak checking allocators.
Documentation for PathEngine release 6.04 - Copyright © 2002-2024 PathEngine | next: |