Skip to main content
Logo ByteAether

Series “ByteAether.WeakEvent”

Harnessing Weak-Referenced Event Managers and Publish–Subscribe Patterns in .NET Harnessing Weak-Referenced Event Managers and Publish–Subscribe Patterns in .NET

In modern application development, event-driven programming is ubiquitous. Whether you're building rich desktop applications with WPF or web applications with Blazor, events provide a powerful way to decouple components. However, one common pitfall in event-based systems is memory leaks caused by lingering event subscriptions. The weak event pattern, along with publish–subscribe architectures, offers a robust solution by using weak references to hold subscribers. This ensures that objects can...

See all series.