Are routed events weak in WPF
-
23-08-2019 - |
Question
Does routed events in WPF store strong reference to the handler that is attached to them?
Solution
If the control author implemented the WeakEvent pattern then yes. I believe the stock controls use this pattern.
UPDATE: They in fact do NOT. Here is a reference on this and other potential performance problems:
Optimizing WPF Application Performance
Here is a reference on weak events:
HTH
Colby Africa
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow