Question

Does routed events in WPF store strong reference to the handler that is attached to them?

Was it helpful?

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:

Weak Event Patterns

HTH

Colby Africa

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top