Weak References in Go 1.24: Memory Management Superpowers

Go 1.24's new weak package brings powerful memory management capabilities to Go developers. This session takes you on a deep dive into weak references - a feature that allows you to reference objects without preventing garbage collection.
What you'll learn:
- Understanding weak pointers and how they differ from regular references
- Practical implementation patterns for caches, canonicalization maps, and circular reference handling
- Performance implications and memory optimization techniques
- Common pitfalls and best practices
- The journey of weak references in Go: years of community discussion and design evolution

LEVEL: Intermediate

Place
Leonardo
Length
45 min
When
October 7th, 2025
12:15

Abstract

Go 1.24's new weak package brings powerful memory management capabilities to Go developers. This session takes you on a deep dive into weak references - a feature that allows you to reference objects without preventing garbage collection.
What you'll learn:
- Understanding weak pointers and how they differ from regular references
- Practical implementation patterns for caches, canonicalization maps, and circular reference handling
- Performance implications and memory optimization techniques
- Common pitfalls and best practices
- The journey of weak references in Go: years of community discussion and design evolution

We'll walk through real-world code examples, demonstrating how the weak package simplifies designs that previously required complex workarounds. You'll see demonstrations of memory-efficient implementations, backed by performance metrics showing the impact on real applications.
Whether you're building memory-sensitive applications, implementing caching systems, or just want to deepen your understanding of Go's memory model, this session will equip you with practical knowledge you can apply immediately. Come discover how this small but mighty addition to the standard library can transform your approach to memory management in Go.

GoLab is a conference made by Develer.
Develer is a company based in Campi Bisenzio, near Florence. Our motto is : "Technology to give life to your products". We produce hardware and software to create exceptional products and to improve industrial processes and people's well being.
In Develer we have passion for the new technologies and we offer our clients effective solutions that are also efficient, simple and safe for the end users. We also believe in a friendly and welcoming environment where anybody can give their contribution. This passion and this vision are what we've been driven to organize our conference "made by developers for developers".


Subscribe to our newsletter

We hate spam just as much as you do, which is why we promise to only send you relevant communications. We respect your privacy and will never share your information with third parties.
©2025 GoLab | The international conference on Go in Florence-Design & devCantiere Creativo-Made withDatoCMS