November 1999
Intermediate to advanced
336 pages
6h 29m
English
Version 1 is limited to managing Rational objects only. What if we wanted a memory manager for some other class of a different size? Duplicating the memory management logic for every class will be an unnecessary waste of developer time. If we look at the implementation of the Rational memory manager, it becomes apparent that the memory management logic is really independent of the particular Rational class. The only dependency is the size of the class object—a good candidate for a template implementation of a memory pool. The memory pool will manage a pool of available objects of a certain type. A template implementation would allow us to vary the specific class that we are managing.
template < class ...
Read now
Unlock full access