Axiom.Components.Terrain.TerrainMaterialGenerator.Dispose C# (CSharp) Method

Dispose() public method

public Dispose ( ) : void
return void
        public void Dispose()
        {
            if (mProfiles != null)
            {
                mProfiles.Clear();
                mProfiles = null;
            }
            if (mCompositeMapRTT != null && TextureManager.Instance != null)
            {
                TextureManager.Instance.Remove(mCompositeMapRTT);
                mCompositeMapRTT = null;
            }
            if (mCompositeMapSM != null && Root.Instance != null)
            {
                // will also delete cam and objects etc
                Root.Instance.DestroySceneManager(mCompositeMapSM);
                mCompositeMapSM = null;
                mCompositeMapCam = null;
                mCompositeMapPlane = null;
                mCompositeMapLight = null;
            }
        }
        #endregion