Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

282
Vistas
Blobs created in JS not released after URL.revokeObjectURL

I have this simple JS function used to load (and show) images from byte arrays

function setElementSrc(element, mimeType, buffer) {
    var blob = new Blob([buffer], { type: mimeType });
    var objectUrl = URL.createObjectURL(blob);
    element.src = objectUrl;
    element.onload = function () {
        URL.revokeObjectURL(objectUrl);
    };
}

Since the object url gets revoked in onload I would expect there to be no more references to the blob. Yet, when I look into chrome debugger or chrome://blob-internals/ they remain there forever, having one reference. Even when the img itself is gone.

The URL.revokeObjectURL(objectUrl) does work, since after its call the object url is not reachable anymore.

Do I understand something wrong? What am I missing? Is there a way to see what is still referencing the blob?

about 4 years ago · Santiago Gelvez
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda