Weak Pointers in C++ (std::weak_ptr) @TheCherno
Weak Pointers in C++ (std::weak_ptr)  @TheCherno
Uploaded June 2024 | Updated September 2026, 2 weeks ago
To try everything Brilliant has to offer—free—for a full 30 days, visit brilliant.org/TheCherno . You’ll also get 20% off an annual premium subscription.

Patreon ► patreon.com/thecherno
Instagram ► instagram.com/thecherno
Twitter ► twitter.com/thecherno
Discord ► discord.gg/thecherno

Hazel ► hazelengine.com
🕹️ Play our latest game FREE (made in Hazel!) ► studiocherno.itch.io/dichotomy

🌏 Need web hosting? ► hostinger.com/cherno

📚 CHAPTERS
0:00 - Intro
1:14 - How shared pointers work
5:40 - Raw pointers as weak references
8:38 - Weak pointers
12:49 - Cyclical dependencies need weak pointers
13:50 - Code Review example
16:04 - Conclusion

💰 Links to stuff I use:
⌨ Keyboard ► geni.us/T2J7
🐭 Mouse ► geni.us/BuY7
💻 Monitors ► geni.us/wZFSwSK

This video is sponsored by Brilliant.
Weak Pointers in C++ (std::weak_ptr)I used AI to do a C++ University AssignmentEvents - C++ Application ArchitectureGetting ready for GAME JAM NEXT WEEK! 😱 // C++ Game Engine Programming StreamFIRST GAME in C++! Did He Do a Good Job? // Code Review (C++/SDL2)Path Tracing // Ray Tracing seriesOver-engineering software is... good?BEST C++ CODE ever written // Code ReviewLets Talk About AIConversion Operators in C++SOME UNIQUE C++ CODE! // Pacman Clone Code ReviewThumbnail Driven Development
The Cherno |

Weak Pointers in C++ (std::weak_ptr)

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER