-
-
Notifications
You must be signed in to change notification settings - Fork 32
Description
I am using MahApps.Metro, v1.6.5.
MetroWindow with mah:DialogParticipation.Register="{Binding}" doesn't get disposed after the ShowDialog() call.
Example usage: I have two windows - MainWindow and MyDialogView. Each has it's own view model - MainWindowViewModel and MyDialogViewModel.
MainWindowViewModel contains a OpenDialogCommand, which opens the dialog view.
MyDialogViewModel contains a CloseCommand, which raises an OnClose event. The MainWindowViewModel handles the OnClose event and closes the dialog window.
For easier debugging I instantiate a large byte array in the MyDialogViewModel constructor. If I open and close the dialog window multiple times the memory usage only increases (by 1GB). But if I remove the DialogParticipation.Register parameter, then the memory usage gets decreased when the garbage collector runs.
I prepared an example here