JOIN ME
—————
YouTube 🎬 [ Ссылка ]
Patreon 🚀 [ Ссылка ]
COMPLETE PLAYLIST
————————————
C++ Tutorial For Beginners :
[ Ссылка ]
STL (Standard Template Library) :
[ Ссылка ]
ThreadIng In C++ : [ Ссылка ]
Data Structures: [ Ссылка ]
Algorithms: [ Ссылка ]
Design Patterns: [ Ссылка ]
Smart Pointers: [ Ссылка ]
C++14: [ Ссылка ]
C++17: [ Ссылка ]
C++ All Type Casts: [ Ссылка ]
INTERVIEW PLAYLIST
————————————
C++ Interview Q&A: [ Ссылка ]
C++ Interview Q&A For Experienced: [ Ссылка ]
Linked List Interview Questions: [ Ссылка ]
BST Interview Questions: [ Ссылка ]
Array Interview Questions: [ Ссылка ]
String Interview Questions: [ Ссылка ]
Bit Manipulation Questions: [ Ссылка ]
Binary Tree Interview Question: [ Ссылка ]
Sorting Algorithms: [ Ссылка ]
C++ MCQ: [ Ссылка ]
C MCQ: [ Ссылка ]
C Interview Questions: [ Ссылка ]
QUICK SHORT VIDEOS
————————————-
C++ Short : [ Ссылка ]
C Short : [ Ссылка ]-
DESCRIPTION:
In this video we will learn about shared pointer in smart pointer series in c++.
There are few points about it:
0. shared_ptr is a smart pointer which can share the ownership of object (managed object).
1. Several shared_ptr can point to the same object (managed object).
2. It keep a reference count to maintain how many shared_ptr are pointing to the same object.
and once last shared_ptr goes out of scope then the managed object gets deleted.
3. shared_ptr is threads safe and not thread safe. [what is this??]
a. control block is thread safe
b. managed object is not
4. There are three ways shared_ptr will destroyed managed object.
a. If the last shared_ptr goes out of scope.
b. If you initialise shared_ptr with some other shared_ptr.
c. If you reset shared_ptr.
5. Reference count doesn't work when we use reference or pointer of shared_ptr.
#stl #cpp #programming #tutorial #interviewquestions #softwareengineering #computerscience
Ещё видео!