© Roger Villela 2020
R. VillelaIntroducing Mechanisms and APIs for Memory Management https://doi.org/10.1007/978-1-4842-5416-5_4

4. Working with Smart Pointers: unique_ptr, shared_ptr, and weak_ptr

Roger Villela1 
(1)
Sao Paulo, São Paulo, Brazil
 

In this chapter, you’ll learn more about memory management using the smart pointers unique_ptr, shared_ptr, and weak_ptr.

Pointers Review

Chapter 3 gave you an overview of the composite type pointer, introducing some concepts and presenting a practical use of a composite type pointer. In Chapter 3 you also started to work with raw pointers and with smart pointers, specifically with unique_ptr.

In this chapter, you will learn about more specific features of unique_ptr and also learn about shared_ptr and weak_ptr ...

Get Introducing Mechanisms and APIs for Memory Management: Using Windows OS Native Runtime APIs now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.