I have a code that looks like this:
class MyUserControl : Control { ... protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e) { base.OnGotKeyboardFocus(e); StartDoingSomethingRisky() } protected override void OnLostKeyboardFocus(KeyboardFocusChangedEventArgs e) { base.OnLostKeyboardFocus(e); StopDoingSomethingRisky(); }
Should I worry that in some cases I can continue the risky operation even after the disappearance of MyUserControl or cover 100% of the cases?
source share