Fixed memory leaks

This commit is contained in:
Maciej Suminski
2018-12-11 16:21:43 +01:00
parent 7e1498a46f
commit a9efbf4716
11 changed files with 22 additions and 30 deletions
+1 -3
View File
@@ -79,7 +79,7 @@ private:
wxString m_ConvertedFileName;
wxSize m_frameSize;
wxPoint m_framePos;
wxConfigBase* m_config;
std::unique_ptr<wxConfigBase> m_config;
public:
BM2CMP_FRAME( KIWAY* aKiway, wxWindow* aParent );
@@ -223,8 +223,6 @@ BM2CMP_FRAME::~BM2CMP_FRAME()
m_config->Write( KEYWORD_LAST_FORMAT, m_radioBoxFormat->GetSelection() );
m_config->Write( KEYWORD_LAST_MODLAYER, m_radio_PCBLayer->GetSelection() );
delete m_config;
/* This needed for OSX: avoids further OnDraw processing after this
* destructor and before the native window is destroyed
*/