Packt

C++ Memory Management

Ends in 4 days! Get Coursera Plus for $239/year this Black Friday and explore skills that last.

Packt

C++ Memory Management

Included with Coursera PlusLearn more

Gain insight into a topic and learn the fundamentals.
Intermediate level

Recommended experience

2 weeks to complete
at 10 hours a week
Flexible schedule
Learn at your own pace
Gain insight into a topic and learn the fundamentals.
Intermediate level

Recommended experience

2 weeks to complete
at 10 hours a week
Flexible schedule
Learn at your own pace

What you'll learn

  • Master the C++ object model to write more efficient and maintainable code

  • Automate resource management to reduce manual errors and improve safety

  • Customize memory allocation operators to optimize performance for specific applications

Details to know

Shareable certificate

Add to your LinkedIn profile

Recently updated!

November 2026

Assessments

17 assignments

Taught in English

There are 16 modules in this course

This module delves into the core concepts of C++ memory management, focusing on how objects, pointers, and references are used to control and manipulate memory. Learners will gain an understanding of object lifetime, memory layout, and the behavior of copy and move operations. The content prepares students to write efficient and safe C++ code by exploring low-level memory mechanics.

What's included

1 video7 readings1 assignment

This module explores common pitfalls in C++ programming, including undefined behavior, implementation-defined behavior, and unsafe type conversions. Learners will gain a deeper understanding of how to write reliable and portable code by avoiding risky practices. The content emphasizes the importance of careful memory management and type safety.

What's included

1 video4 readings1 assignment

This module delves into the mechanics of type conversion in C++ through casts and cv-qualifications. Learners will gain an understanding of how to safely manage type integrity and control memory access. The focus is on practical applications of casting mechanisms and their implications in program behavior.

What's included

1 video3 readings1 assignment

This module covers the role of destructors in C++ for managing resources and ensuring clean code. It explains the RAII idiom, discusses best practices for object lifetime and memory management, and highlights the importance of avoiding exceptions in destructors.

What's included

1 video5 readings1 assignment

This module covers the fundamentals of using C++ standard smart pointers, such as std::unique_ptr and std::shared_ptr, to manage resources safely and efficiently. Learners will gain an understanding of ownership semantics, memory management, and best practices for using these tools in modern C++ programming. The module also explores scenarios where raw pointers are still appropriate.

What's included

1 video8 readings1 assignment

This module delves into the implementation and usage of smart pointers in C++, focusing on ownership semantics, memory management, and the creation of custom smart pointer types. Learners will gain a deep understanding of how to safely manage resources and avoid common pitfalls in C++ programming. The content also covers advanced topics like type traits and performance considerations.

What's included

1 video6 readings1 assignment

This module explores advanced techniques for custom memory allocation in C++, focusing on the use and customization of new and delete operators. Learners will gain a deep understanding of how to control memory management, including non-throwing versions and placement new. The module also introduces C++20's destroying delete feature for more efficient object destruction.

What's included

1 video6 readings1 assignment

This module guides learners through the process of building a basic memory leak detector in C++. It covers operator overloading, thread safety, and memory tracking techniques, providing hands-on experience with low-level programming concepts.

What's included

1 video6 readings1 assignment

This module delves into advanced C++ memory management techniques, including placement new, nothrow new, and custom new handlers. Learners will explore how to handle out-of-memory scenarios and manage exotic memory types in standard C++ programs. The module provides practical examples and code implementations to reinforce understanding of atypical allocation mechanisms.

What's included

1 video6 readings1 assignment

This module delves into advanced memory management techniques, focusing on arena-based allocation and size-based algorithms. Learners will gain practical insights into optimizing performance and reducing memory fragmentation in software systems. Through real-world examples and testing, students will understand how to implement and evaluate specialized memory strategies.

What's included

1 video7 readings1 assignment

This module explores the concept of deferred reclamation in C++, focusing on how to delay object destruction to improve performance and manage memory more efficiently. It covers different implementations, including reclamation without finalization, with finalization at program end, and on-demand reclamation at the end of a scope. Learners will gain a clear understanding of how to implement and use deferred reclamation techniques in real-world programs.

What's included

1 video5 readings1 assignment

This module explores the implementation of generic containers in C++ with a focus on explicit memory management. Learners will gain skills in designing efficient and safe container structures, applying standard memory algorithms, and understanding exception safety in dynamic data structures.

What's included

1 video9 readings1 assignment

This module explores how to implement generic containers with implicit memory management, focusing on the benefits and techniques for simplifying memory handling in Vector<T> and ForwardList<T>. Learners will understand how to apply these strategies to enhance code efficiency and maintainability.

What's included

1 video3 readings1 assignment

This module explores the implementation of allocator-aware containers in C++, focusing on memory management techniques, practical applications, and advanced strategies for optimizing container behavior. Learners will gain insights into how allocators interact with containers and how to manage memory efficiently in real-world coding scenarios.

What's included

1 video9 readings1 assignment

This module delves into advanced topics in C++ memory management, focusing on techniques such as object lifetime control, trivial relocation, and type-aware allocation. Learners will gain insights into optimizing resource usage and handling complex memory scenarios without relying on traditional constructors.

What's included

1 video4 readings1 assignment

This module introduces essential C++ concepts such as struct, class, size_t, and undefined behavior, along with the use of standard library algorithms and the decltype operator. Learners will gain a deeper understanding of type systems, memory management, and design patterns to improve code reliability and performance.

What's included

1 video4 readings2 assignments

Instructor

Packt - Course Instructors
Packt
2,690 Courses785,579 learners

Offered by

Packt

Explore more from Software Development

What brings you to Coursera today?

Why people choose Coursera for their career

Felipe M.

Learner since 2018
"To be able to take courses at my own pace and rhythm has been an amazing experience. I can learn whenever it fits my schedule and mood."

Jennifer J.

Learner since 2020
"I directly applied the concepts and skills I learned from my courses to an exciting new project at work."

Larry W.

Learner since 2021
"When I need courses on topics that my university doesn't offer, Coursera is one of the best places to go."

Chaitanya A.

"Learning isn't just about being better at your job: it's so much more than that. Coursera allows me to learn without limits."

Frequently asked questions