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.
http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2011-January/029741.html

Also referenced:
http://www.khronos.org/webgl/public-mailing-list/archives/1009/msg00229.html

ArrayBuffer can now be closed out of the current thread via Transferable semantics.
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.

-Charles

Reply via email to