Loading common/tool/tool_manager.cpp +9 −1 Original line number Original line Diff line number Diff line Loading @@ -103,6 +103,14 @@ TOOL_MANAGER::TOOL_MANAGER() : TOOL_MANAGER::~TOOL_MANAGER() TOOL_MANAGER::~TOOL_MANAGER() { DeleteAll(); delete m_actionMgr; } void TOOL_MANAGER::DeleteAll() { { std::map<TOOL_BASE*, TOOL_STATE*>::iterator it, it_end; std::map<TOOL_BASE*, TOOL_STATE*>::iterator it, it_end; Loading @@ -113,7 +121,7 @@ TOOL_MANAGER::~TOOL_MANAGER() delete it->first; // delete the tool itself delete it->first; // delete the tool itself } } delete m_actionMgr; m_toolState.clear(); } } Loading include/tool/tool_manager.h +5 −0 Original line number Original line Diff line number Diff line Loading @@ -57,6 +57,11 @@ public: ~TOOL_MANAGER(); ~TOOL_MANAGER(); /** * Deletes all the tools that were registered in the TOOL_MANAGER. */ void DeleteAll(); /** /** * Generates an unique ID from for a tool with given name. * Generates an unique ID from for a tool with given name. */ */ Loading pcbnew/tools/pcb_tools.cpp +1 −0 Original line number Original line Diff line number Diff line Loading @@ -68,6 +68,7 @@ void PCB_EDIT_FRAME::setupTools() void PCB_EDIT_FRAME::destroyTools() void PCB_EDIT_FRAME::destroyTools() { { m_toolManager.DeleteAll(); delete m_toolDispatcher; delete m_toolDispatcher; } } Loading Loading
common/tool/tool_manager.cpp +9 −1 Original line number Original line Diff line number Diff line Loading @@ -103,6 +103,14 @@ TOOL_MANAGER::TOOL_MANAGER() : TOOL_MANAGER::~TOOL_MANAGER() TOOL_MANAGER::~TOOL_MANAGER() { DeleteAll(); delete m_actionMgr; } void TOOL_MANAGER::DeleteAll() { { std::map<TOOL_BASE*, TOOL_STATE*>::iterator it, it_end; std::map<TOOL_BASE*, TOOL_STATE*>::iterator it, it_end; Loading @@ -113,7 +121,7 @@ TOOL_MANAGER::~TOOL_MANAGER() delete it->first; // delete the tool itself delete it->first; // delete the tool itself } } delete m_actionMgr; m_toolState.clear(); } } Loading
include/tool/tool_manager.h +5 −0 Original line number Original line Diff line number Diff line Loading @@ -57,6 +57,11 @@ public: ~TOOL_MANAGER(); ~TOOL_MANAGER(); /** * Deletes all the tools that were registered in the TOOL_MANAGER. */ void DeleteAll(); /** /** * Generates an unique ID from for a tool with given name. * Generates an unique ID from for a tool with given name. */ */ Loading
pcbnew/tools/pcb_tools.cpp +1 −0 Original line number Original line Diff line number Diff line Loading @@ -68,6 +68,7 @@ void PCB_EDIT_FRAME::setupTools() void PCB_EDIT_FRAME::destroyTools() void PCB_EDIT_FRAME::destroyTools() { { m_toolManager.DeleteAll(); delete m_toolDispatcher; delete m_toolDispatcher; } } Loading