C++ Language/Std/CRuntime/HeapMemory/Allocation
Dynamic memory management with the C-Runtime is done by calling malloc()
, which returns a pointer to the newly-allocated memory.
Give that pointer to free()
when you are ready to deallocate that memory.
Additional information about dynamic memory allocation (includes interactive examples)