Преглед изворни кода

dispose when pipeline is disposed

Trevor Baron пре 7 година
родитељ
комит
7d1dc96407

+ 4 - 0
src/PostProcess/RenderPipeline/Pipelines/babylon.defaultRenderingPipeline.ts

@@ -576,6 +576,9 @@
                     if(this.grain){
                         this.grain.dispose(camera);
                     }
+                    if(this._glowLayer){
+                        this._glowLayer.dispose();
+                    }
                 }
             }
             
@@ -591,6 +594,7 @@
                 (<any>this._chromaticAberrationEffect) = null;
                 (<any>this.grain) = null;
                 (<any>this._grainEffect) = null;
+                this._glowLayer = null;
             } 
         }