Memory management is scary. It should be: A lot can go wrong--often very wrong. But a moderately experienced C or C++ programmer can learn and understand memory hazards completely.
Explains why a class that provides its own class-specific operator new(), or operator new[](), should also provide corresponding class-specific versions of plain new, in-place new, and nothrow new.
Stephen Dewhurst discusses how the various features of C++ are used together in memory management, how they sometimes interact in surprising ways, and how to simplify their interactions.
Using several features of the language, this article presents a framework for resource allocation which is temporally deterministic, provides for callback, provides memory pools, and can provide for deadlock prevention.