August 2004
Intermediate to advanced
352 pages
7h 38m
English
If there's one issue dear to the heart of C and C++ programmers, it's memory and resource management. One of C++'s greatest strengths compared to other languages is the power it gives the programmer to control and manage memory and other resources, particularly to selectively automate memory management using the standard containers.
How well do you understand the real memory cost of using the different standard containers? Can you state with certainty that a list containing 1,000 objects will consume less total memory space than, say, a set of 1,000 of the same type of object? Then, touching back on the exceptions front: Does using the nothrow form of new help to make code more exception-safe? And finally, ...