Skip to content

Commit 1571513

Browse files
committed
Some clarifying? comments
1 parent 682852f commit 1571513

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

engine/updategraph/src/main/java/io/deephaven/engine/liveness/RetainedReferenceTracker.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,10 @@ public void cleanup() {
181181
* <p>
182182
* Initiate the idempotent cleanup process. This will enqueue all retained references to be dropped if their
183183
* referents still exist. No new references may be added to or dropped from this tracker.
184+
*
185+
* @apiNote This should be invoked in proactive cleanup scenarios before any destructive cleanup operations are
186+
* undertaken, in order to allow the system to record the state of the retention graph and propagate
187+
* proactive cleanup as far as possible.
184188
*
185189
* @return A {@link SafeCloseable} that will process the queued drops if necessary. Must be called exactly once,
186190
* after any other desired cleanup has been performed.
@@ -491,7 +495,8 @@ void addOnCleanup(@NotNull final WeakReference<? extends LivenessReferent> refer
491495

492496
void addOnEnsureDropped(@NotNull final WeakReference<? extends LivenessReferent> reference) {
493497
/*
494-
* Preserve reachability from the time of invocation.
498+
* Preserve reachability from the time of invocation. This is intended to make sure that proactive cleanup
499+
* respects the state of the world at the time it was initiated.
495500
*/
496501
final LivenessReferent referent = reference.get();
497502
pendingDrops.add(referent == null ? reference : referent);

0 commit comments

Comments
 (0)