Boehm and Spertus, two key insiders, report on the C++ standards committee’s progress toward supporting automatic storage reclamation and memory leak detection. However, Boehm and Spertus do far more than merely list the relevant features included in the committee’s current draft; they also provide a cogent explanation for why these particular features were included, while others were not.
Because garbage collectors need to identify the blocks of memory that are accessible, the draft standard prohibits previously legal actions such as dereferencing a pointer value that was read from an input stream. However, the draft standard does provide an escape valve for programmers who need to write tricky code--they can use a new pair of procedures to explicitly declare reachable memory blocks.
Because C++ has a weak type system, storage declared with integral types can contain pointers. In some programs, this can greatly increase the amount of memory fruitlessly examined for pointers. In fact, this examination can be even worse: nonpointer values can be mistaken for pointers. Therefore, the committee’s draft gives programmers a way to explicitly declare pointer-free memory areas.
To justify these extensions to the C++ standard, Boehm and Spertus explain not only the value they offer, but also the limited cost that they entail. They also describe a more ambitious proposal, and explain why the committee postponed it until the next round of standardization.