Fix a mem leak i caused

This commit is contained in:
aris-kimi 2025-06-26 23:24:05 +03:00
parent 77c7cf7cc4
commit 1d7053ea62

View File

@ -489,6 +489,16 @@ SIM_PLOT_TAB::SIM_PLOT_TAB( const wxString& aSimCommand, wxWindow* parent ) :
SIM_PLOT_TAB::~SIM_PLOT_TAB()
{
while( !m_plotsVector.empty() )
{
SIM_PLOT_DIAGRAM* plot = m_plotsVector.back();
m_plotsVector.pop_back();
delete plot;
}
m_plotsVector.clear();
// ~mpWindow destroys all the added layers, so there is no need to destroy m_traces contents
}