Перейти к содержимому

C++ snippets 02: What are smart pointers?

Újfalusi Ábel

0:00 / 0:00

C++ snippets 02: What are smart pointers?

4 просмотра · 5 дней назад
Újfalusi Ábel
2 подписчика
4 просмотра · 5 дней назад
Hey there! This is a new episode of the C++ snippets series where I present different C++ features. This video's topic is smart pointers, a very interesting feature of C++. Smart pointers were introduced into the std library in C++ 11. They were a simple response to critiques about lack of garbage collection inside C++. It is a safe way to manage allocations and deallocations of objects and a great way to avoid manage memory leaks. We will talk about the 3 types of smart pointers the std library provides for us. We will analyze use cases and limitations of each in this episode. Chapters: 0:00 Introduction 3:02 Discussion on unique_ptr 13:00 Discussion on shared_ptr 17:20 Discussion on weak_ptr Check out the rest of the series! Dou you need personalized tutoring with math and computer science topics? Got a project you need guidance or help with? Contact me https://ujfalusiabel.com/