Memory leak: occurs when a piece of memory previously allocated by a programmer is not properly de-allocated. The memory remains reserved even though it is not in use anymore and cannot be allocated/used by the program until de-allocated.
It is important to note that pointers should be set to 0 once what they have been pointing to is deleted.
The heap is memory set aside for dynamic allocation. Unlike the stack, you can allocate a block of memory at anytime using the "new" keyword. But once you have allocated memory on the heap, you are responsible for deallocating the moemory once you don't need it anymore by using the "delete" keyword. Failure to do so will result in a memory leak.
Pointers are used to access memory on the heap meaning that variables can be accessed globally.