mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-06-24 00:14:12 +02:00
Fix TerminalData memory leak in Terminal destructor
Terminal stores its TerminalData* as member d but never deletes it. Every Element creation (placing on diagram, loading icon for the element browser, drag previews) leaks one TerminalData per terminal. ASan confirmed 112 leaked objects (9856 bytes) in a short session across four call sites all rooted in Element::parseTerminal. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -86,6 +86,7 @@ Terminal::Terminal(TerminalData* data, Element* e) :
|
||||
*/
|
||||
Terminal::~Terminal() {
|
||||
qDeleteAll(m_conductors_list);
|
||||
delete d;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user