Thomas Levesque 8/16/2015

Weak events in C#, take two

Read Original

The article details an evolved solution for implementing weak events in C# to avoid memory leaks from forgotten event unsubscriptions. It explains the API, which mimics standard events, its limitation to EventHandler<TEventArgs> signatures, and the performance improvements using cached open-instance delegates instead of DynamicInvoke.

Weak events in C#, take two

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week