Weak Pointers are not a new feature in Golang 1.24 because they were used internally. But now, they are officially available in Go 1.24. Generic Type Aliases also exist in Go 1.24, so feel free to check out this video:
https://youtu.be/WJ_-z-mLsOE
📝 Description
In this video, we are going to cover the weak pointers. We are going to cover why and when to use Weak Pointers and we are going to apply them to a really simplified cache. You will learn the following things:
• What is a Weak Pointer
• When to apply a Weak Pointer
• How to implement a simplified cache using Weak Pointers
⏳ Timestamps:
00:00 - Introduction
00:26 - What is a Weak Pointer
02:10 - Implementing the highly simplified cache
07:50 - The memory leak
08:34 - Applying Weak Pointers
11:57 - Outro
👋 Hey there!
If you are new to this channel: Hey 👋 my name is Flo and I am a professional software engineer with a passion for coding in Golang, TypeScript, JavaScript, and Rust. This channel is where I share that passion and dive into the exciting world of software engineering.
📨 Support and Connect!
Buy me a coffee: https://www.buymeacoffee.com/florianwoelki
Become a member. https://www.youtube.com/@FloWoelki/membership
Discord: https://discord.gg/TnA7drJ
Instagram: https://www.instagram.com/flowydev/
LinkedIn: https://www.linkedin.com/in/florian-woelki/
TikTok: https://www.tiktok.com/@florianwoelki
GitHub: https://github.com/FlorianWoelki
📝 Copyright Notice
The original Go Gopher version is originally designed by Renée French (Source: https://go.dev/blog/gopher License details: https://creativecommons.org/licenses/by/4.0/). The gopher used in the video and thumbnail is inspired by this author.
🤗 Acknowledgments
- Thank you, @sascha1461, for the German title fix
- Thank you, @kratos_ai, for the French title fix
#golang #go1.24 #weakpointers