The heap is reserved for the memory allocation needs of the program. It is an area apart from the program code and from the stack. Typical C programs use the functions malloc and free to allocate and deallocate memory to and from the heap. The Debug version of the Microsoft Foundation Class Library provides modified versions of the C++ built-in operators new and delete to allocate and deallocate objects in heap memory. When you use new and delete instead of malloc and free you are able to take advantage of the Foundation's memory-management debugging enhancements, which can be useful in detecting memory leaks. When you build your program with the Release version of the Microsoft Foundation Class Library, new and delete still provide an efficient way to allocate and deallocate memory.