Top Categories
JOIN THIS CHANNEL: youtube https://www.youtube.com/channel/UCs6sf4iRhhE875T1QjG3wPQ/join patreon https://www.patreon.com/cppnuts play list for smart pointers: https://www.youtube.com/watch?v=wUzn0HljjRE&list=PLk6CEY9XxSIAI2K-sxrKzzSyT6UZR5ObP play list for STL: https://www.youtube.com/watch?v
JOIN THIS CHANNEL: youtube https://www.youtube.com/channel/UCs6sf4iRhhE875T1QjG3wPQ/join patreon https://www.patreon.com/cppnuts play list for smart pointers: https://www.youtube.com/watch?v=wUzn0HljjRE&list=PLk6CEY9XxSIAI2K-sxrKzzSyT6UZR5ObP play list for STL: https://www.youtube.com/watch?v=LyGlTmaWEPs&list=PLk6CEY9XxSIA-xo3HRYC3M0Aitzdut7AA play list for C++14: https://www.youtube.com/watch?v=1EAL_RRCKhY&list=PLk6CEY9XxSIAloDTEauOy_ss9fEqSP4JR play list for Threads In C++: https://www.youtube.com/watch?v=TPVH_coGAQs&list=PLk6CEY9XxSIAeK-EAh3hB4fgNvYkYmghp play list for C++ Interview Questions And Answer: https://www.youtube.com/watch?v=QSuBwGmFQqA&list=PLk6CEY9XxSIDy8qVHZV-Nf-r9f2BkRZ6p play list for C++ Tutoria For Beginners: https://www.youtube.com/watch?v=3IynvwjrV-U&list=PLk6CEY9XxSIAQ2vE_Jb4Dbmum7UfQrXgt paly list for Design Patterns: https://www.youtube.com/watch?v=XyNWEWUSa5E&list=PLk6CEY9XxSIDZhQURp6d8Sgp-A0yKKDKV play list for Linked List Interview Questions: https://www.youtube.com/watch?v=M5tQ4fJMsr0&list=PLk6CEY9XxSICJ0XSI7fbQFiEpDHISJxqT play list for Data Structures: https://www.youtube.com/watch?v=7tLVMUKLu2s&list=PLk6CEY9XxSIBG2Gv6-d1WE3Uxqx94o5B2 play list for Type Casts: https://www.youtube.com/watch?v=HlNVgmvX1EI&list=PLk6CEY9XxSIC6I_HCjMTGf8eV2Ty0a19E paly list for Sorting Algorithms: https://www.youtube.com/watch?v=Vv-gs437i2g&list=PLk6CEY9XxSICqQ9wicEpRh3jYNTtSHVOy In this video we will learn about one of the smart pointer called unique pointer in c++. It is written as unique_ptr. NOTES: 0. unique_ptr is a class template. 1. unique_ptr is one of the smart pointer provided by c++11 to prevent memory leaks. 2. unique_ptr wraps a raw pointer in it, and de-allocates the raw pointer, when unique_ptr object goes out of scope. 3. similar to actual pointers we can use arrow and * on the object of unique_ptr, because it is overloaded in unique_ptr class. 4. When exception comes then also it will de-allocate the memory hence no memory leak. 5. Not only object we can create array of objects of unique_ptr. #smartPointer #unique_ptr #CppNuts