Basic Techniques (cont.)
Reference counting problems
- Problem with cycles
- reference counts may never reach zero
- programmers may need to avoid using cyclic data structures
- Efficiency problems
- short-lived stack variables can cause big overhead
- Treatment: Deferred Reference Counting
- adjust reference counts only now and then