MENU

Fun & Interesting

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

The Cherno 69,363 lượt xem 10 months ago
Video Not Working? Fix It Now

To try everything Brilliant has to offer—free—for a full 30 days, visit https://brilliant.org/TheCherno . You’ll also get 20% off an annual premium subscription.

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

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

🌏 Need web hosting? ► https://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 ► https://geni.us/T2J7
🐭 Mouse ► https://geni.us/BuY7
💻 Monitors ► https://geni.us/wZFSwSK

This video is sponsored by Brilliant.

Comment