Closed dmitrykm closed 11 years ago
Argh, I thought I fixed this when I fixed #79 but see that was only for Flyout. I'm curious about the previous memory leak statement that you seem to have edited out...where was the leak?
No leaks, sorry that was my mistake, just needed to run GC.
If we use the same instance of SettingsFlyout many times, setting IsOpen=true opens the flyout the first time. If user then light dismisses it, subsequent IsOpen=true doesn't open flyout as property changed callback for IsOpen dp doesn't fire because the property's value is True since the last time flyout was open. Adding IsOpen=false in OnHostPopupClosed helps.
Edit: such reuse will actually work only after commenting out two more lines in OnHostPopupClosed: //_hostPopup.Child = null; and //this.Content = null; though the changes are only for the case of sharing single instance of SettingsFlyout.