Top Categories
JOIN THIS CHANNEL: youtube https://www.youtube.com/channel/UCs6sf4iRhhE875T1QjG3wPQ/join patreon https://www.patreon.com/cppnuts IMPORTANT PLAY LISTS: play list for smart pointers: https://www.youtube.com/watch?v=wUzn0HljjRE&list=PLk6CEY9XxSIAI2K-sxrKzzSyT6UZR5ObP play list for STL: https://w
JOIN THIS CHANNEL: youtube https://www.youtube.com/channel/UCs6sf4iRhhE875T1QjG3wPQ/join patreon https://www.patreon.com/cppnuts IMPORTANT PLAY LISTS: 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 C++ MCQ: https://www.youtube.com/watch?v=RJqS2JwlM6E&list=PLk6CEY9XxSIAr1ig2XzKJ1XS23Pn7SVnK play list for C MCQ: https://www.youtube.com/watch?v=yRzEGZ-QouU&list=PLk6CEY9XxSIBs60KjvhQMtjl1UjVcJC2E play list for C Interview Questions: https://www.youtube.com/watch?v=RQZ9DE4nUR4&list=PLk6CEY9XxSIB9jwcI0SP_FbamuqSWxvse 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 see what is the actual use of weak_ptr in c++. This is actually one of the smart pointer in c++. NOTES: 0. If we say unique_ptr is for unique ownership and shared_ptr is for shared ownership then weak_ptr is for non-ownership smart pointer. 1. It actually reference to an object which is managed by shared_ptr. 2. A weak_ptr is created as a copy of shared_ptr. 3. We have to convert weak_ptr to shared_ptr in order to use the managed object. 4. It is used to remove cyclic dependency between shared_ptr.