Next: Sample Applications, Previous: random.h, Up: Top [Contents][Index]
"calib/shutdown.h"
Header.The "calib/shutdown.h"
header provides a single function:
void calib_shutdown (void);
When an application is finished using the CALIB library, it can call this function to free up all memory that is statically held by the CALIB library.
Applications should be careful to not call this function while CALIB objects requested by the application still exist, as this function may cause these objects to become invalid and inconsistent.
If the application has freed all its CALIB objects and then called
calib_shutdown()
, CALIB is specifically designed so that the
application can start using CALIB once again.
This can serve to release all of CALIB’s statically-held memory
back to the memory heap.
(Of course the run time memory heap implementation may or may not
release this memory back to the operating system.)
The calib_shutdown()
function is intended to assist in
eliminating memory leaks from applications that use CALIB, and perhaps
also in reducing memory usage caused by “intermediate expression
swell” at points where CALIB is otherwise quiescent.