On Mon, Oct 24, 2011 at 4:01 PM, Ojan Vafai <[email protected]> wrote: > In theory, a BlobBuilder could be backed by a file on disk, no? The > advantage is that if you're building something very large, you don't > necessarily need to be using all that memory. You can imagine a UA having > Blobs be fully in-memory until they cross some size threshold.
It does seem like something of an edge case to add a very big string or arraybuffer and then keep the BlobBuilder alive for long enough after that that both the string/arraybuffer is otherwise GC'ed, *and* that that memory usage is an issue. Worst case you can always change x.push(mylargestring); into x.push(new Blob(mylargestring)); and then the UA should be able to do the same optimization. / Jonas
