From dc60757b68009e2a2620f674e279d973a2b1a2aa Mon Sep 17 00:00:00 2001 From: Matt Hanna Date: Mon, 9 Jan 2012 23:04:53 -0500 Subject: [PATCH] Eliminate unnecessary strong references (and therefore memory held) by tree reduce entries that have already been processed. Thanks to Tim Fennell for the bug report. --- .../broadinstitute/sting/gatk/executive/TreeReducer.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/public/java/src/org/broadinstitute/sting/gatk/executive/TreeReducer.java b/public/java/src/org/broadinstitute/sting/gatk/executive/TreeReducer.java index d36a3b576..6acaadd50 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/executive/TreeReducer.java +++ b/public/java/src/org/broadinstitute/sting/gatk/executive/TreeReducer.java @@ -27,8 +27,8 @@ import java.util.concurrent.Future; public class TreeReducer implements Callable { private HierarchicalMicroScheduler microScheduler; private TreeReducible walker; - private final Future lhs; - private final Future rhs; + private Future lhs; + private Future rhs; /** * Create a one-sided reduce. Result will be a simple pass-through of the result. @@ -99,6 +99,10 @@ public class TreeReducer implements Callable { long endTime = System.currentTimeMillis(); + // Constituent bits of this tree reduces are no longer required. Throw them away. + this.lhs = null; + this.rhs = null; + microScheduler.reportTreeReduceTime( endTime - startTime ); return result;