-
Book Overview & Buying
-
Table Of Contents
C++ Memory Management
By :
We are progressing. In Chapter 1, we looked at what memory, objects, and pointers are, as we know we will need to understand these basic ideas if we are to take control of memory management mechanisms. Then, in Chapter 2, we looked at some low-level constructs that could get us in trouble if misused are essential to understand in certain situations to take control of how our programs manage memory. That’s a somewhat dry way to start, but that also means the fun parts of our work are still to come. I hope that’s encouraging!
At the end of Chapter 2, we examined approaches to type punning, a way to subvert the type system, including some that are believed to work by some but actually do not. C++ offers a number of controlled and explicit ways to interact with the type system, informing the compiler that it should see the type of an expression as something different than what it can otherwise infer from the source code. These tools, the type...