freemember of the
brmem.hfor a precise declaration)
void brmem_free_cbfn(void *) Deallocator
An application defined call-back function that will reclaim memory previously allocated by
void BR_CALLBACK CBFnMemFree(void* block)
void * block
Address of memory no longer required, previously returned by the corresponding
(with no intervening
Null is ignored.
Preconditions: The diagnostic handler has been setup (
). BRender has not necessarily completed initialisation. Other allocation handlers may have already been used. BRender is the only direct caller of this function. The application has disposed of all references to the memory (obtained using the supplied address).
Effects: Release supplied memory (presumably making it available for re-use).
If the supplied address is invalid (not recognised as previously allocated by the corresponding
), consider this a failure condition and handle appropriately. Note that the BRender diagnostic handling system may not be available, or even capable of handling this condition.
Remarks: The memory freed will not necessarily increase the value returned by
, though it is of course a hopeful effect.
The application should immediately set to
Null all pointers referencing the memory freed, (at least in a debug version).
stdmem.cfor examples of memory deallocation functions.