[Swift-commit] r7072 - trunk/src/org/griphyn/vdl/karajan/lib

hategan at ci.uchicago.edu hategan at ci.uchicago.edu
Mon Sep 16 15:49:21 CDT 2013


Author: hategan
Date: 2013-09-16 15:49:21 -0500 (Mon, 16 Sep 2013)
New Revision: 7072

Modified:
   trunk/src/org/griphyn/vdl/karajan/lib/While.java
Log:
fixed issues with iterate

Modified: trunk/src/org/griphyn/vdl/karajan/lib/While.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/While.java	2013-09-16 18:31:59 UTC (rev 7071)
+++ trunk/src/org/griphyn/vdl/karajan/lib/While.java	2013-09-16 20:49:21 UTC (rev 7072)
@@ -97,9 +97,16 @@
                     while (true) {
                         body.run(thr);
                         if (next.isEmpty()) {
+                            // must do this twice since the closeDataSet calls
+                            // inside the iterate won't be called if the iterate 
+                            // condition is true
                             RefCount.decRefs(drefs);
+                            RefCount.decRefs(drefs);
                             break;
                         }
+                        else {
+                            RefCount.incRefs(drefs);
+                        }
                         Object val = next.removeFirst();
                         if (tracer.isEnabled()) {
                             tracer.trace(thr, unwrap(next));




More information about the Swift-commit mailing list