SearchDialog: Fixed memory leak.

This commit is contained in:
YuSanka 2023-09-27 12:40:58 +02:00
parent 003232dfb6
commit 0027d4c5f1
2 changed files with 7 additions and 1 deletions

View File

@ -575,6 +575,12 @@ SearchDialog::SearchDialog(OptionsSearcher* searcher)
topSizer->SetSizeHints(this);
}
SearchDialog::~SearchDialog()
{
if (search_list_model)
search_list_model->DecRef();
}
void SearchDialog::Popup(wxPoint position /*= wxDefaultPosition*/)
{
const std::string& line = searcher->search_string();

View File

@ -182,7 +182,7 @@ class SearchDialog : public GUI::DPIDialog
public:
SearchDialog(OptionsSearcher* searcher);
~SearchDialog() {}
~SearchDialog();
void Popup(wxPoint position = wxDefaultPosition);
void ProcessSelection(wxDataViewItem selection);