W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2012

Re: [FileAPI] Deterministic release of Blob proposal

From: Charles Pritchard <chuck@jumis.com>
Date: Fri, 02 Mar 2012 19:40:23 -0800
Message-ID: <4F5192A7.6060800@jumis.com>
To: Feras Moussa <ferasm@microsoft.com>
CC: "public-webapps@w3.org" <public-webapps@w3.org>, Adrian Bateman <adrianba@microsoft.com>
On 3/2/2012 4:54 PM, Feras Moussa wrote:
> At TPAC we discussed the ability to deterministically close blobs with 
> a few
> others.
> To address this issue, we propose that a close method be added to the 
> Blob
> interface.
> When called, the close method should release the underlying resource 
> of the
> Blob, and future operations on the Blob will return a new error, a 
> ClosedError.
> This allows an application to signal when it's finished using the Blob.

I suppose the theory of Blob is that it can be written to disk. The 
other theory is that reference counting can somehow work magic.
I'm not sure, but it came up before.

I brought up a close mechanism for ArrayBuffer, which is (I believe) 
supposed to be in memory, always.

Also referenced:

ArrayBuffer can now be closed out of the current thread via Transferable 
I don't know if it disappears into space with an empty postMessage target.

I don't think that works for Blob, though.

Yes, I'd like to see immediate mechanisms to cleanup Blob and ArrayBuffer.
In practical use, it wasn't an issue on the desktop and the iPhone 
hadn't picked up the semantics yet.

But gosh it's no fun trying to navigate memory management on mobile 
device. Thus my low memory event thread.

Received on Saturday, 3 March 2012 03:40:40 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:31 UTC