Commit d86f7dcd authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

plug huge memory leak

in my quest to de-virtualize the ProItems i also devirtualized their
d'tors without providing a replacement. whoops.

Reviewed-by: dt
Task-number: QTCREATORBUG-1003
parent efcdadd2
......@@ -45,10 +45,13 @@ ProBlock::~ProBlock()
for (ProItem *itm, *nitm = m_proitems; (itm = nitm); ) {
nitm = itm->m_next;
if (itm->kind() == BlockKind)
static_cast<ProBlock *>(itm)->deref();
delete itm;
switch (itm->kind()) {
case BlockKind: static_cast<ProBlock *>(itm)->deref(); break;
case FunctionKind: delete static_cast<ProFunction *>(itm); break;
case ConditionKind: delete static_cast<ProCondition *>(itm); break;
case OperatorKind: delete static_cast<ProOperator *>(itm); break;
case VariableKind: delete static_cast<ProVariable *>(itm); break;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment