Pointers and memory management

Some sort of memory management discipline or policy must be practiced to keep system memory in reliable form. Taligent's Guide to Designing Programs suggests various policies that help assure working memory is used effectively and efficiently while avoiding memory leaks and multiple deletion of objects. The key concepts involve regulating the way pointers are used to manage heap objects. Objects can create, copy, orphan, and adopt other objects by passing and returning pointers and references.

Safe pointers are implemented as templates. Templates allow safe pointers to have a type in the same sense as raw C++ pointers. The template implementation of safe pointers lets them have identical syntax and nearly identical semantics with C++ pointers once the pointers have been declared.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker