O'Reilly logo

Exploring C++ 11, Second Edition by Ray Lischner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

EXPLORATION 59

image

Dynamic Memory

Declaring pointers is all well and good, but real programs have to do more. The next step is to learn how to create new objects on the fly, at runtime. Your program takes full control over the lifetime of these objects, destroying the objects only when the program is done using them. This Exploration details how to allocate and free memory dynamically. It also continues to develop artifact and related classes from Exploration 58.

I want to warn you, however, not to run off immediately and start using dynamic memory in your programs. We still have several more Explorations to go, each one building on its predecessors. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required