Procházet zdrojové kódy

making sure material and children are disposed correctly.

Raanan Weber před 7 roky
rodič
revize
d4e54468d9
1 změnil soubory, kde provedl 1 přidání a 3 odebrání
  1. 1 3
      Viewer/src/model/viewerModel.ts

+ 1 - 3
Viewer/src/model/viewerModel.ts

@@ -727,8 +727,6 @@ export class ViewerModel implements IDisposable {
         this.skeletons.length = 0;
         this._animations.forEach(ag => ag.dispose());
         this._animations.length = 0;
-        this._meshes.forEach(m => m.dispose());
-        this._meshes.length = 0;
-        this.rootMesh.dispose();
+        this.rootMesh.dispose(false, true);
     }
 }