C++ expert Herb Schildt uses practical, high-powered applications to illustrate some of the most interesting features of this language. The book includes “Pure code” subsystems you can adapt to your own programs, and discusses financial calculations and file utilities. A C++ interpreter, an AI-based search engine, and a Web-based example for those programmers who interface C++ with the Internet are also included. Chapter 2 discusses the ongoing debate concerningthe best way to manage the use of dynamically allocated memory and develops a complete garbage collection subsystem for C++.
Download the PDF of Chapter 2: “A Simple Garbage Collector for C++”
Reproduced from The Art of C++ by permission of McGraw-Hill Osborne Media ISBN 0072255129, copyright 2004. All rights reserved.