6.11. Handling Pointers

Do not delete any pointer that was not given to you by new. If you delete an array, follow delete by [ ]. [Bad delete: 2-8 points]

If you perform
  delete p;
then you must have obtained pointer p using new, for example by
  p = new T;
If you perform
  delete [] p;
then you must have obtained pointer p using new, for example by
  p = new T[n];

Do not make use of a dangling pointer [Dangling pointer: 1-8 points]

A dangling pointer is a pointer that points to something that your program should not use. Do not make use of it.

Avoid memory faults during execution [Memory fault: 5-50 points]

A memory fault occurs when a program uses an address that it does not own. The program stops immediately.

Avoid memory leaks [Memory leak: 1-5 points]

A memory-leak occurs when a program loses access to memory without deleting it.