Sfoglia il codice sorgente

DRACOLoader: Revoke workerSourceURL. (#25174)

Michael Herzog 2 anni fa
parent
commit
6e2fe97f32
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  1. 6 0
      examples/jsm/loaders/DRACOLoader.js

+ 6 - 0
examples/jsm/loaders/DRACOLoader.js

@@ -351,6 +351,12 @@ class DRACOLoader extends Loader {
 
 
 		this.workerPool.length = 0;
 		this.workerPool.length = 0;
 
 
+		if ( this.workerSourceURL !== '' ) {
+
+			URL.revokeObjectURL( this.workerSourceURL );
+
+		}
+
 		return this;
 		return this;
 
 
 	}
 	}