The combination of dynamic allocation and linked data structures is
extremely attractive because it utilizes memory with very high
efficiency.
However
- The programmer is responsible for freeing memory, as soon as
possible, but no sooner.
- Extra memory space is required to store links. This overhead is
usually small compared to the increased utilization of memory,
but be wary.
- The code for manipulating linked structures may be more complex
than for contiguous structures:
- This complexity should be invisible to the user
of an abstract data type.
- It is the implementer's problem and should be
limited to core operations.