Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
C++ Memory Management

You're reading from   C++ Memory Management Write leaner and safer C++ code using proven memory-management techniques

Arrow left icon
Product type Paperback
Published in Mar 2025
Publisher Packt
ISBN-13 9781805129806
Length 442 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Patrice Roy Patrice Roy
Author Profile Icon Patrice Roy
Patrice Roy
Arrow right icon
View More author details
Toc

Table of Contents (23) Chapters Close

Preface 1. Part 1: Memory in C++ FREE CHAPTER
2. Chapter 1: Objects, Pointers, and References 3. Chapter 2: Things to Be Careful With 4. Chapter 3: Casts and cv-qualifications 5. Part 2: Implicit Memory Management Techniques
6. Chapter 4: Using Destructors 7. Chapter 5: Using Standard Smart Pointers 8. Chapter 6: Writing Smart Pointers 9. Part 3: Taking Control (of Memory Management Mechanisms)
10. Chapter 7: Overloading Memory Allocation Operators 11. Chapter 8: Writing a Naïve Leak Detector 12. Chapter 9: Atypical Allocation Mechanisms 13. Chapter 10: Arena-Based Memory Management and Other Optimizations 14. Chapter 11: Deferred Reclamation 15. Part 4: Writing Generic Containers (and a Bit More)
16. Chapter 12: Writing Generic Containers with Explicit Memory Management 17. Chapter 13: Writing Generic Containers with Implicit Memory Management 18. Chapter 14: Writing Generic Containers with Allocator Support 19. Chapter 15: Contemporary Issues 20. Annexure: Things You Should Know 21. Index 22. Other Books You May Enjoy

Technical requirements

This book assumes that readers have some basic knowledge of C++ or of syntactically similar languages such as C, Java, C#, or JavaScript. For this reason, we will not explain the basics of variable declarations, loops, if statements, or functions.

We will, however, use some aspects of the C++ language in this chapter that some readers might be less comfortable with. Please refer to Annexure: Things You Should Know, before reading this book.

Some of the examples use C++20 or C++23, so make sure that your compiler supports this version of the standard to get the most out of them.

The code for this chapter can be found here: https://github.com/PacktPublishing/C-Plus-Plus-Memory-Management/tree/main/chapter1.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime