Pārlūkot izejas kodu

DRACOLoader: Revoke workerSourceURL. (#25174)

Michael Herzog 2 gadi atpakaļ
vecāks
revīzija
6e2fe97f32
1 mainītis faili ar 6 papildinājumiem un 0 dzēšanām
  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;
 
+		if ( this.workerSourceURL !== '' ) {
+
+			URL.revokeObjectURL( this.workerSourceURL );
+
+		}
+
 		return this;
 
 	}