Bug 21523: Make AudioContext and AudioNode Lifetime sections informative
authorcrogers
Fri, 05 Apr 2013 15:02:56 -0700
changeset 284 91d5720c1600
parent 283 15d5da7bffc0
child 285 8b83d1ca7553
Bug 21523: Make AudioContext and AudioNode Lifetime sections informative
webaudio/specification.html
--- a/webaudio/specification.html	Fri Apr 05 14:49:12 2013 -0700
+++ b/webaudio/specification.html	Fri Apr 05 15:02:56 2013 -0700
@@ -1170,12 +1170,13 @@
 </div>
 
 <h3 id="lifetime-AudioContext">4.1.3. Lifetime</h3>
+<p class="norm">This section is informative.</p>
+
 <p>
-Once created, an <code>AudioContext</code> will not be garbage collected.  It will live until the document goes away.
+Once created, an <code>AudioContext</code> will continue to play sound until it has no more sound to play, or
+the page goes away.
 </p>
 
-
-
 <div id="OfflineAudioContext-section-section" class="section">
 <h2 id="OfflineAudioContext-section">4.1b. The OfflineAudioContext Interface</h2>
 <p>
@@ -1447,6 +1448,13 @@
 </div>
 
 <h3 id="lifetime-AudioNode">4.2.3. Lifetime</h3>
+
+<p class="norm">This section is informative.</p>
+
+<p>An implementation may choose any method to avoid unnecessary resource usage and unbounded memory growth of unused/finished
+nodes.  The following is a description to help guide the general expectation of how node lifetime would be managed.
+</p>
+
 <p>
 An <code>AudioNode</code> will live as long as there are any references to it.  There are several types of references:
 </p>
@@ -1455,7 +1463,7 @@
 <li>A <em>normal</em> JavaScript reference obeying normal garbage collection rules. </li>
 <li>A <em>playing</em> reference for both <code>AudioBufferSourceNodes</code> and <code>OscillatorNodes</code>.
 These nodes maintain a <em>playing</em>
-reference to themselves while they are in the SCHEDULED_STATE or PLAYING_STATE.</li>
+reference to themselves while they are currently playing.</li>
 <li>A <em>connection</em> reference which occurs if another <code>AudioNode</code> is connected to it.   </li>
 <li>A <em>tail-time</em> reference which an <code>AudioNode</code> maintains on itself as long as it has
 any internal processing state which has not yet been emitted.  For example, a <code>ConvolverNode</code> has
@@ -1470,12 +1478,12 @@
 </p>
 
 <p>
-When an <code>AudioNode</code> has no references it will be deleted.  But before it is deleted, the implementation must disconnect the node
+When an <code>AudioNode</code> has no references it will be deleted.  But before it is deleted, it will disconnect itself
 from any other <code>AudioNodes</code> which it is connected to.  In this way it releases all connection references (3) it has to other nodes.
 </p>
 
 <p>
-Regardless of any of the above references, an <code>AudioNode</code> will be deleted when its <code>AudioContext</code> is deleted.
+Regardless of any of the above references, it can be assumed that the <code>AudioNode</code> will be deleted when its <code>AudioContext</code> is deleted.
 </p>