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.
This commit is contained in:
Matt Hanna 2012-01-09 23:04:53 -05:00
parent 845c0b1c66
commit dc60757b68
1 changed files with 6 additions and 2 deletions

View File

@ -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;