In modern browsers, it's possible to allocate a large object as a Blob
, then request access to it via a URL. This URL will serve the stored object (such as an image's data) elsewhere in the browser.
How does the browser know when this URL is no longer needed, and the corresponding Blob
data is free to be garbage collected?
The browser will eventually clear up this resource, however it may be some while (hours or days) before it is removed from memory/disk.
If you wish to explicitly remove the object, you may do so via
revokeObjectURL
.