[prev] [index] [next]

Memory Management (cont)

Warning! Warning! Warning! Warning!

Careless use of malloc() / free() / pointers

  • can mess up the data in the heap
  • so that later malloc() or free() cause run-time errors
  • possibly well after the original error occurred
Such errors are very difficult to track down and debug.

Be very careful with your use of malloc() / free() / pointers.