W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2011

[whatwg] Limiting the amount of downloaded but not watched video

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 18 Jan 2011 14:09:09 -0500
Message-ID: <4D35E555.907@mit.edu>
On 1/18/11 2:01 PM, Zachary Ozer wrote:
> On Tue, Jan 18, 2011 at 6:46 PM, Boris Zbarsky<bzbarsky at mit.edu>  wrote:
>> On 1/18/11 12:11 PM, Zachary Ozer wrote:
>>> (Side
>>> note: I also haven't found a browser that stops loading the resource
>>> even if you destroy the video tag.)
>> "destroy" in what sense?  You verified in a debugger that it had been
>> garbage collected?
> I'm doing document.body.removeChild. Is there a better way to do it?

Not really, no.  Once you remove it, even if there is nothing 
referencing it anymore (which may or may not be the case depending on 
what other code is running on the page), it still won't be destroyed 
until the next time garbage collection happens.  In the case of garbage 
collectors that can do different levels of collection (generational, 
etc), it won't be destroyed until whatever level is needed to destroy it 

In general, depending on finalizers to release resources (which is 
what's happening here) is not really a workable setup.  Maybe we need an 
api to explicitly release the data on an audio/video tag?

Received on Tuesday, 18 January 2011 11:09:09 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:29 UTC