Completed Chapter 20 Preventing Memory Leaks.