[html5] r3227 - [] (0) Fix the garbage collection rules for ports to actually make sense, and ad [...]
whatwg at whatwg.org
whatwg at whatwg.org
Thu Jun 11 20:22:07 PDT 2009
Author: ianh
Date: 2009-06-11 20:22:05 -0700 (Thu, 11 Jun 2009)
New Revision: 3227
Modified:
index
source
Log:
[] (0) Fix the garbage collection rules for ports to actually make sense, and add a note for authors urging them not to rely on the gc for ports.
Modified: index
===================================================================
--- index 2009-06-12 01:17:56 UTC (rev 3226)
+++ index 2009-06-12 03:22:05 UTC (rev 3227)
@@ -58416,16 +58416,16 @@
</div>
+ <h5 id=ports-and-garbage-collection><span class=secno>8.3.3.1 </span>Ports and garbage collection</h5>
+
<div class=impl>
- <h5 id=ports-and-garbage-collection><span class=secno>8.3.3.1 </span>Ports and garbage collection</h5>
+ <p>When a <code><a href=#messageport>MessagePort</a></code> object <var title="">o</var> is
+ entangled, user agents must either act as if <var title="">o</var>'s
+ entangled <code><a href=#messageport>MessagePort</a></code> object has a strong reference to
+ <var title="">o</var>, or as if <var title="">o</var>'s owner has a
+ strong reference to <var title="">o</var>.</p>
- <p>When a <code><a href=#messageport>MessagePort</a></code> object is entangled, user agents
- must either act as if the object has a strong reference to its
- entangled <code><a href=#messageport>MessagePort</a></code> object, or as if the
- <code><a href=#messageport>MessagePort</a></code> object's owner has a strong reference to
- the <code><a href=#messageport>MessagePort</a></code> object.</p>
-
<div class=note>
<p>Thus, a message port can be received, given an event listener,
@@ -58454,8 +58454,14 @@
</div>
+ <p class=note>Authors are strongly encouraged to explicitly close
+ <code><a href=#messageport>MessagePort</a></code> objects to disentangle them, so that their
+ resources can be recollected. Creating many <code><a href=#messageport>MessagePort</a></code>
+ objects and discarding them without closing them can lead to high
+ memory usage.</p>
+
<h2 id=syntax><span class=secno>9 </span><dfn>The HTML syntax</dfn></h2>
<p class=note>This section only describes the rules for <code title="">text/html</code> resources. Rules for XML resources are
Modified: source
===================================================================
--- source 2009-06-12 01:17:56 UTC (rev 3226)
+++ source 2009-06-12 03:22:05 UTC (rev 3227)
@@ -71951,16 +71951,16 @@
</div>
+ <h5>Ports and garbage collection</h5>
+
<div class="impl">
- <h5>Ports and garbage collection</h5>
+ <p>When a <code>MessagePort</code> object <var title="">o</var> is
+ entangled, user agents must either act as if <var title="">o</var>'s
+ entangled <code>MessagePort</code> object has a strong reference to
+ <var title="">o</var>, or as if <var title="">o</var>'s owner has a
+ strong reference to <var title="">o</var>.</p>
- <p>When a <code>MessagePort</code> object is entangled, user agents
- must either act as if the object has a strong reference to its
- entangled <code>MessagePort</code> object, or as if the
- <code>MessagePort</code> object's owner has a strong reference to
- the <code>MessagePort</code> object.</p>
-
<div class="note">
<p>Thus, a message port can be received, given an event listener,
@@ -71989,8 +71989,14 @@
</div>
+ <p class="note">Authors are strongly encouraged to explicitly close
+ <code>MessagePort</code> objects to disentangle them, so that their
+ resources can be recollected. Creating many <code>MessagePort</code>
+ objects and discarding them without closing them can lead to high
+ memory usage.</p>
+
<h2 id="syntax"><dfn>The HTML syntax</dfn></h2>
<p class="note">This section only describes the rules for <code
More information about the Commit-Watchers
mailing list