]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/ssa/SSABlock.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 / SSABlock.java
index ba9d62d27ce730bffc2b99772321406736125e07..60e156a7f0a683dbac408cf2d9b8ba8d61bfa035 100644 (file)
@@ -598,5 +598,12 @@ public final class SSABlock extends Cont implements Printable, BoundVarBinder {
             statement.forValRefs(visitor);
         exit.forValRefs(visitor);
     }
+
+    public void cleanup() {
+        for(SSAStatement statement = firstStatement;
+                statement != null; statement = statement.next)
+            statement.cleanup();
+        exit.cleanup();
+    }
     
 }