]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/ssa/exits/If.java
Added memory leak test and fixed the leak by removing references
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / internal / codegen / ssa / exits / If.java
index 296ec6d1f461545c72222ff8ad49cde1310ef267..4eca7d1aeb35fa851124281175643a0f489025e7 100644 (file)
@@ -223,4 +223,9 @@ public class If extends SSAExit implements ValRefBinder {
     public void forValRefs(ValRefVisitor visitor) {
         visitor.visit(condition);
     }
     public void forValRefs(ValRefVisitor visitor) {
         visitor.visit(condition);
     }
+
+    @Override
+    public void cleanup() {
+        condition.remove();
+    }
 }
 }