]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/ssa/SSAFunction.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 / SSAFunction.java
index b9e8bfbb398e0803977e305533259eb0eb6d4982..209c92a64af4016687339f559e6639369093a7bb 100644 (file)
@@ -154,7 +154,7 @@ public final class SSAFunction extends SSAClosure {
         
         // Add valid variables and continuations
         context.validContinuations.add(returnCont);        
-        for(SSABlock block = firstBlock; block != null; block = block.next) {            
+        for(SSABlock block = firstBlock; block != null; block = block.next) {
             context.validContinuations.add(block);  
             for(BoundVar parameter : block.parameters)
                 context.validBoundVariables.add(parameter);
@@ -461,4 +461,9 @@ public final class SSAFunction extends SSAClosure {
             block.forValRefs(visitor);
     }
 
+    @Override
+    public void cleanup() {
+        for(SSABlock block = firstBlock; block != null; block = block.next)
+            block.cleanup();
+    }
 }