Skip to content

Commit

Permalink
Merge pull request #2362 from Dmitri-Kom/dmitri-kom/fix-event-leak-at…
Browse files Browse the repository at this point in the history
…-binding's-remove-property-event

Unsubscribe from the input event handler
  • Loading branch information
cwensley committed Jan 9, 2023
2 parents f19b13b + 91205a2 commit 6eb7332
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Eto/Forms/Binding/Binding.helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,10 @@ public static void RemovePropertyEvent(object obj, EventHandler<EventArgs> eh)
{
var helper = eh.Target as PropertyNotifyHelper;
if (helper != null)
{
helper.Changed -= eh;
helper.Unregister(obj);
}
}

/// <summary>
Expand Down

0 comments on commit 6eb7332

Please sign in to comment.