- From: Domenic Denicola <notifications@github.com>
- Date: Thu, 12 Jul 2018 10:56:24 -0700
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/streams/pull/940/review/136762429@github.com>
domenic approved this pull request.
LGTM, nicely done. Yay for code review!
> @@ -4015,6 +4017,25 @@ throws>SetUpWritableStreamDefaultControllerFromUnderlyingSink ( <var>stream</var
_closeAlgorithm_, _abortAlgorithm_, _highWaterMark_, _sizeAlgorithm_).
</emu-alg>
+<h4 id="writable-stream-default-controller-clear-algorithms" aoid="WritableStreamDefaultControllerClearAlgorithms"
+nothrow>WritableStreamDefaultControllerClearAlgorithms ( <var>controller</var> )</h4>
+
+This abstract operation is called once the stream is closed or errored and the algorithms will not be executed any more.
+By removing the algorithm references it permits the <a>underlying sink</a> object to be garbage collected even if the
+{{WritableStream}} itself is still referenced.
+
+<p class="note">The results of this algorithm are not currently observable, but could become so if JavaScript eventually
+adds <a href="https://github.com/tc39/proposal-weakrefs/">weak references</a>. But even without that factor,
+implementations will likely want to include similar steps.</p>
+
+<p class="note">This operation will be performed multiple times in some edge cases. After the first time it will do nothing.</p>
Nit: line too long
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/940#pullrequestreview-136762429
Received on Thursday, 12 July 2018 17:56:50 UTC