On 30.3.2012 5:40, Glenn Maynard wrote:
2012/3/29 Bronislav Klučka <[email protected] <mailto:[email protected]>>

    Sure, weak referencing is probably not well explored approach, but
    the underlying idea applied to blob is interesting: URL creates no
    reference to Blob (from GC perspective), meaning Blob is subjected
    to GC regardless of BlobUrl existence. This would remove the need
    for revoking URL, programmers would only need to maintain blobs
    they want to be persistent (e.g. in some global array).


Weak referencing is pretty well explored, I think. It's intentionally not supported for the most part in JavaScript, because most weakref features expose garbage collection behavior to scripts. Web APIs don't do that.

This approach exposes GC behavior, making it possible to write code that behaves differently depending on GC.

--
Glenn Maynard


The point was not to talk about weak refs, but about not creating a GC reference from URL to Blob

Brona

Reply via email to