Explicit Heap-Dynamic Storage Binding:
Explicit Heap-Dynamic variables are nameless (abstract) memory cells that are allocated and deallocated by explicit run-time instructions specified by the programmer.Go To Static Storage BindingExample in C++:
int * intnode;
...
intnode = new int; // allocates an int cell
...
delete intnode; // deallocates the cell to which intnode points
The new operator automatically creates an object of proper size, and remains a pointer of the connect type.
To free the space for this object, use the delete operator.
On page 229 of Data Structures with C++ using STL, second edition, by William Ford & William Topp:You can think of the heap as a bank of memory, much like a financial
bank that maintains a reserve of money. A program can borrow
(allocate) memory from the heap when additional storage space is required
and then pay it back (deallocate) when it is no longer needed.