فهرست منبع

Renaming Freeing Methods

sebastien 7 سال پیش
والد
کامیت
f8a8af5d80
4فایلهای تغییر یافته به همراه12 افزوده شده و 5 حذف شده
  1. 1 1
      src/Materials/babylon.material.ts
  2. 2 1
      src/Mesh/babylon.abstractMesh.ts
  3. 1 1
      src/Rendering/babylon.renderingManager.ts
  4. 8 2
      src/babylon.scene.ts

+ 1 - 1
src/Materials/babylon.material.ts

@@ -1212,7 +1212,7 @@
         public dispose(forceDisposeEffect?: boolean, forceDisposeTextures?: boolean): void {
             // Animations
             this.getScene().stopAnimation(this);
-            this.getScene().resetProcessedMaterials();
+            this.getScene().freeProcessedMaterials();
 
             // Remove from scene
             var index = this._scene.materials.indexOf(this);

+ 2 - 1
src/Mesh/babylon.abstractMesh.ts

@@ -1334,7 +1334,8 @@
             var index: number;
 
             // Smart Array Retainers.
-            this.getScene().resetActiveMeshes();
+            this.getScene().freeActiveMeshes();
+            this.getScene().freeRenderingGroups();
 
             // Action manager
             if (this.actionManager !== undefined && this.actionManager !== null) {

+ 1 - 1
src/Rendering/babylon.renderingManager.ts

@@ -136,7 +136,7 @@
         }
 
         /**
-         * Clear the info related to rendering groups preventing retention point in material dispose.
+         * Clear the info related to rendering groups preventing retention points during dispose.
          */
         public freeRenderingGroups(): void {
             for (let index = RenderingManager.MIN_RENDERINGGROUPS; index < RenderingManager.MAX_RENDERINGGROUPS; index++) {

+ 8 - 2
src/babylon.scene.ts

@@ -3173,14 +3173,14 @@
         /**
          * Clear the processed materials smart array preventing retention point in material dispose.
          */
-        public resetProcessedMaterials(): void {
+        public freeProcessedMaterials(): void {
             this._processedMaterials.dispose();
         }
 
         /**
          * Clear the active meshes smart array preventing retention point in mesh dispose.
          */
-        public resetActiveMeshes(): void {
+        public freeActiveMeshes(): void {
             this._activeMeshes.dispose();
             if (this.activeCamera && this.activeCamera._activeMeshes) {
                 this.activeCamera._activeMeshes.dispose();
@@ -3193,6 +3193,12 @@
                     }
                 }
             }
+        }
+
+        /**
+         * Clear the info related to rendering groups preventing retention points during dispose.
+         */
+        public freeRenderingGroups(): void {
             if (this._renderingManager) {
                 this._renderingManager.freeRenderingGroups();
             }