Github user ahgittin commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/835#discussion_r143085630
--- Diff:
core/src/main/java/org/apache/brooklyn/util/core/task/BasicExecutionManager.java
---
@@ -797,6 +800,7 @@ public TaskLookup(BasicExecutionManager mgr, Task<?> t)
{
.description("Details of the original task have been
forgotten.")
.body(Callables.returning((T)null)).build();
((BasicTask<T>)t).ignoreIfNotRun();
+ ((BasicTask<T>)t).cancelled = true;
--- End diff --
never occurred to me that marking cancelled might help with GC. have added
comments.
the only thing i was optimizing was the surprising expense of soft
references (noted 30 lines earlier)
---