O'Reilly logo

Imperfect C++ Practical Solutions for Real-Life Programming by Matthew Wilson

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

Chapter 5. Object Access Models

We've talked a lot about what the lifetime of an object means, both in terms of what actions are performed by the compiler on our behalf (with our functions), and in terms of the details of the mechanisms involved. Now I'd like to talk about lifetime issues as they pertain to the relationships between object instances, in particular between container objects and the client code that uses their contained objects. (Note that when I refer to a container in this section, I mean both containers in the standard sense—list, vector, map—and any composite types that “contain” their member variables.)

Vouched Lifetimes

This is the simplest and most efficient manner in which one object can allow another access to the objects ...

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