Bläddra i källkod

add dispose that was missing

Trevor Baron 7 år sedan
förälder
incheckning
9fbd1f8be9

+ 6 - 2
src/PostProcess/RenderPipeline/Pipelines/babylon.defaultRenderingPipeline.ts

@@ -535,6 +535,10 @@
                     if(this.chromaticAberration){
                         this.chromaticAberration.dispose(camera);
                     }
+
+                    if(this._defaultPipelineMerge){
+                        this._defaultPipelineMerge.dispose(camera);
+                    }
                 }
             }
             
@@ -543,9 +547,11 @@
 
             if(disposeNonRecreated){
                 (<any>this.sharpen) = null;
+                (<any>this._sharpenEffect) = null;
                 (<any>this.depthOfField) = null;
                 (<any>this.bloom) = null;
                 (<any>this.chromaticAberration) = null;
+                (<any>this._chromaticAberrationEffect) = null;
             } 
         }
 
@@ -554,9 +560,7 @@
          */
         public dispose(): void {
             this._disposePostProcesses(true);
-
             this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name, this._cameras);
-
             this._scene.autoClear = true;
             super.dispose();
         }