]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/constants/SCLConstant.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 / constants / SCLConstant.java
index 14bcbcaf65e84e645e99948b02c80a508033ef83..9089ebb817209e1735ebcaf3dcfd7e39d65585b9 100644 (file)
@@ -373,4 +373,11 @@ public class SCLConstant extends DelegateConstant implements Named {
         if(inlineArity < Integer.MAX_VALUE)
             inlinableDefinition = (SSAFunction)definition.copy();
     }
+
+    public void cleanup() {
+        if(definition != null)
+            definition.cleanup();
+        if(inlinableDefinition != null)
+            inlinableDefinition.cleanup();
+    }
 }