Memory allocation can be divided into two main categories: frame allocations and heap allocations. One main difference between the two allocation techniques is that with heap allocation you are always given a pointer to the memory block, whereas with frame allocation you typically work with the actual memory block itself. Another major difference between the two schemes is that frame objects are automatically deleted and heap objects must be explicitly deleted by the programmer.
The following sections describe how to use the capabilities of C and C++ to accomplish memory allocations on the frame and on the heap.