RE: recording proposal

Is the conclusion that we don't need to say anything about garbage
collection?  If garbage collection occurs automatically once all
references to an object are list, then the behavior that Adam wants
falls out automatically.  The ondataavailable event contains a reference
to the Blob of data.  Once the event has been processed, then if no one
else has acquired a reference to the Blob, it can be gc'd.  Otherwise,
it sticks around until the last reference to it is dropped.  

- Jim

-----Original Message-----
From: Harald Alvestrand [mailto:harald@alvestrand.no] 
Sent: Tuesday, October 16, 2012 11:54 AM
To: public-media-capture@w3.org
Subject: Re: recording proposal

On 10/16/2012 11:08 AM, Adam Bergkvist wrote:
> On 2012-10-05 15:55, Jim Barnett wrote:
>> Here is a proposal for recording for discussion on Tuesday's call.
>>
>> -Jim and Travis
>>
>
>> The UA may garbage collect the original Blob of data once the 
>> dataavailable event that contains it has been processed.
>
> Does this mean that I couldn't do the following?
>
> var blobs = [];
> track.ondataavailable = function (evt) {
>     blobs.push(evt.data);
> };
Garbage collection doesn't collect memory that you have explicit
references to, does it?

At 2 Mbits/sec, 0.4 Mbytes/sec, it would probably take you a few minutes
to run out of memory (~5 hours for 8G of RAM, actually, unless I slipped
a decimal).
That's completely OK with me. You asked for it, you got it.

Received on Tuesday, 16 October 2012 16:00:38 UTC