gui: Fix Plugin Selector panel memory leak

SafeList is totally unsafe for non-POD objects.
This commit is contained in:
Jonathan Li 2016-12-07 20:25:45 +00:00
parent 592d4b024a
commit faa46bb62d
2 changed files with 2 additions and 3 deletions

View File

@ -563,7 +563,7 @@ namespace Panels
class EnumThread : public Threading::pxThread class EnumThread : public Threading::pxThread
{ {
public: public:
SafeList<EnumeratedPluginInfo> Results; // array of plugin results. std::vector<EnumeratedPluginInfo> Results; // array of plugin results.
protected: protected:
PluginSelectorPanel& m_master; PluginSelectorPanel& m_master;

View File

@ -751,11 +751,10 @@ void Panels::PluginSelectorPanel::OnProgress( wxCommandEvent& evt )
Panels::PluginSelectorPanel::EnumThread::EnumThread( PluginSelectorPanel& master ) Panels::PluginSelectorPanel::EnumThread::EnumThread( PluginSelectorPanel& master )
: pxThread() : pxThread()
, Results( master.FileCount(), L"PluginSelectorResults" ) , Results( master.FileCount() )
, m_master( master ) , m_master( master )
, m_hourglass( Cursor_KindaBusy ) , m_hourglass( Cursor_KindaBusy )
{ {
Results.MatchLengthToAllocatedSize();
} }
void Panels::PluginSelectorPanel::EnumThread::DoNextPlugin( int curidx ) void Panels::PluginSelectorPanel::EnumThread::DoNextPlugin( int curidx )