From faa46bb62d292eee8e766fa87a607042b03990c1 Mon Sep 17 00:00:00 2001 From: Jonathan Li Date: Wed, 7 Dec 2016 20:25:45 +0000 Subject: [PATCH] gui: Fix Plugin Selector panel memory leak SafeList is totally unsafe for non-POD objects. --- pcsx2/gui/Panels/ConfigurationPanels.h | 2 +- pcsx2/gui/Panels/PluginSelectorPanel.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pcsx2/gui/Panels/ConfigurationPanels.h b/pcsx2/gui/Panels/ConfigurationPanels.h index 4d687590f5..dee28af25c 100644 --- a/pcsx2/gui/Panels/ConfigurationPanels.h +++ b/pcsx2/gui/Panels/ConfigurationPanels.h @@ -563,7 +563,7 @@ namespace Panels class EnumThread : public Threading::pxThread { public: - SafeList Results; // array of plugin results. + std::vector Results; // array of plugin results. protected: PluginSelectorPanel& m_master; diff --git a/pcsx2/gui/Panels/PluginSelectorPanel.cpp b/pcsx2/gui/Panels/PluginSelectorPanel.cpp index e49a8234d1..d812e7d105 100644 --- a/pcsx2/gui/Panels/PluginSelectorPanel.cpp +++ b/pcsx2/gui/Panels/PluginSelectorPanel.cpp @@ -751,11 +751,10 @@ void Panels::PluginSelectorPanel::OnProgress( wxCommandEvent& evt ) Panels::PluginSelectorPanel::EnumThread::EnumThread( PluginSelectorPanel& master ) : pxThread() - , Results( master.FileCount(), L"PluginSelectorResults" ) + , Results( master.FileCount() ) , m_master( master ) , m_hourglass( Cursor_KindaBusy ) { - Results.MatchLengthToAllocatedSize(); } void Panels::PluginSelectorPanel::EnumThread::DoNextPlugin( int curidx )