Explorar o código

DRACOLoader: Revoke workerSourceURL. (#25174)

Michael Herzog %!s(int64=2) %!d(string=hai) anos
pai
achega
6e2fe97f32
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  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;
 
 	}