4.6 out of 5
4.6
162 reviews on Udemy

Modern C++ Memory Management: Learn to write good code fast

Using the power of C++11 to efficiently write reliable software
Instructor:
Mattias Johansson
1,825 students enrolled
English [Auto]
Write safe and efficient C++ code without memory leaks or memory corruption
Use the features of modern C++ to be more productive

In this course you will learn how to use the power of modern C++ to write reliable C++ code. C++ is otherwise known to be a difficult language, partly because of all the troubles in keeping track of allocated memory resources. 

By taking this course you will learn how to write better C++ code. Code which is not just easier to read, but also faster to write, faster to debug and faster to run! You will learn the structures and principles used in modern C++ to avoid the headaches of manual memory management completely.

Please enjoy this course. I hope you truly enjoy it!

Regards,

  Mattias

P.S. If you are not completely happy with the contents, you are entitled to a no-questions-asked 30 day 100% money-back guarantee.

What are the requirements?

  • This course assumes that you have a basic knowledge of C++ and know how to write a simple C++ program. You may have used C++ professionally or just taken a course or two.

What am I going to get from this course?

  • You will learn how to avoid the headache of manual memory management by using structures and principles of modern C++.

Introduction and Getting Started

1
Welcome
2
Memory model introduction

Background into how C++ defines its memory. We'll show what the stack and the free store are, how we allocate objects on the stack and the free store and what the difference is for us as developers. 

3
Memory management introduction

Understanding what it means to manage the memory while programming in C++. Also listing the most common types of memory errors.

4
Demo: When does memory leaks happen

Taking the theoretical discussion of what a memory leak is into real world examples in real C++ code. 

5
Demo: The stack, the free store and the heap
6
Stack, free store and the heap
7
Demo: Dangling Pointer

Taking the theoretical discussion of what an invalid pointer is into real world examples in real C++ code. 

Elements of Modern C++

1
RAII - Resource Acquisition Is Initialization

Introducing the concept of RAII - resource acquisition is initalization. This is not just an awkward acronym, but is an extremely useful concept in C++ and is the basis of modern C++ resource management. 

2
Solid Objects and scoped objects
3
Introducing the Smart Pointers

Overview of the smart pointers which exists in standard C++.

4
Unique pointer

Introduction to std::unique_ptr, how to create it and how to use it.

5
Demo: Unique Pointer

Demonstration of how to create, use, pass and reset the std::unique_ptr. 

6
The Unique Pointer
7
Shared Pointer

Introduction to std::shared_ptr, how to create it and how to use it. Also why the shared pointer can cause leaks which is exactly what we wanted to avoid!

8
Demo: Shared Pointer

Demonstration of how to create, use and reset the std::shared_ptr. 

9
Shared pointer
10
Weak Pointer

Introduction to the std::weak_ptr, how it solves the problem with shared_ptr and how to create it.

11
Demo: Weak Pointer

Demonstration of how to create and use the std::weak_ptr

12
Vector

Introduction to std::vector which removes the need to allocate arrays using new[]. This shows how the vector works and why this is better than the old arrays. 

13
Demo: using the vector class
14
Vector

Self check to make sure you understood how to use the std::vector

Solving Errors using Modern C++

1
Why your class may need a virtual destructor

When and why the destructor of your class should be virtual

2
Demo: solving the dangling pointer
3
Demo: Dealing with legacy code
You can view and review the lecture materials indefinitely, like an on-demand channel.
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don't have an internet connection, some instructors also let their students download course lectures. That's up to the instructor though, so make sure you get on their good side!
4.6
4.6 out of 5
162 Ratings

Detailed Rating

Stars 5
61
Stars 4
70
Stars 3
27
Stars 2
4
Stars 1
1
c93d60362f3c5c6d4a6ab1169663b3c5
30-Day Money-Back Guarantee

Includes

2 hours on-demand video
Full lifetime access
Access on mobile and TV
Certificate of Completion