I'm after a good implementation of the weak event patterns for Silverlight to avoid memory leaks. There seem to be a few implementations out there but the code is not trivial and it's hard to know which one is correct. I can't find any official recommendation from Microsoft.
I'm after a simple syntax if possible.
Cheers.
Install a copy of the Silverlight Toolkit which comes with source code zipped up. In there you will find the pattern of weak events that you might consider the "Microsoft" recommendation. (You can also fetch the latest source from codeplex).
The implementation you are after is WeakEventListener
found in the Common folder of he main Controls.Toolkit
project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With