I have just finished debugging a memory leak in our code base. The culprit was a global static command which was rooting all controls ever attached to it, through its CanExecuteChanged event.
Surely controls which attach to this event, detach!?
No. WPF expects the ICommand.CanExecuteChanged event to apply WeakReferences for EventHandlers.
So beware if you use global commands that don’t implement this correctly.
An example of how to implement this is here.