deno.com

method URL.revokeObjectURL

#URL.revokeObjectURL(url: string): void

Revokes a previously created object URL, freeing the memory associated with it.

Important for memory management in applications that create dynamic URLs. Once an object URL is revoked:

  • It can no longer be used to fetch the content it referenced
  • The browser/runtime is allowed to release the memory or resources associated with it
  • Workers created via the URL will continue to run, but the URL becomes invalid for new creations

For security and performance in Deno applications, always revoke object URLs as soon as they're no longer needed, especially when processing large files or generating many URLs.

Parameters #

#url: string

Return Type #

void

See #