Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,9 @@ protected virtual void Dispose(bool disposing)
if (_searchHandler != null)
{
_searchHandler.PropertyChanged -= SearchHandlerPropertyChanged;
}
if (_editText != null)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Did you find a related issue? Can you describe the steps to reproduce it? I'd like to include a relevant test with the changes.

Copy link
Author

@Transis-Felipe Transis-Felipe Jun 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsuarezruiz No, I don't find a direct issue related to this.

I was just investigating to see if I can find the reason of other leaks and found this.

It's just a defensive check to ensure that the _editText is not null before attempting to remove it from the FocusChange event.

{
_editText.FocusChange -= EditTextFocusChange;
}
_searchHandler = null;
Expand All @@ -282,4 +285,4 @@ public void Dispose()
Dispose(true);
}
}
}
}