Lapsed-listeners – Memory leaks in subscriber-publisher scenarios
- 📅
- 📝 882 words
- 🕙 4 minutes
- 📦 .NET
- 🏷️ C#, VB.NET
- 💬 1 response
I’ve been promising something .NET related for a while… here’s something!
There exists a ‘gotcha’ in .NET (and other programming environment) whereby an object has subscribed to another objects published event will not be garbage collected when you expect because the environment itself holds a reference to the subscriber inside the event notification system.