public override void Dispose() { foreach (var mapSource in MapSources) { mapSource.Dispose(); } if (BaseMapSource.EmptyTile != null) { BaseMapSource.EmptyTile.Dispose(); } //shader.Dispose(); constBuffer.Dispose(); vertexBuffer.Dispose(); base.Dispose(); }
/// <summary> /// /// </summary> public override void Dispose() { foreach (var tile in tilesToRender) { tile.Value.Dispose(); } foreach (var tile in tilesFree) { tile.Value.Dispose(); } frame.Dispose(); shader.Dispose(); constBuffer.Dispose(); dotsBuf.Dispose(); dotsVB.Dispose(); socioClasses.Dispose(); geoObjects.Dispose(); if (municipalLinesVB != null) { municipalLinesVB.Dispose(); } if (airLinesVB != null) { airLinesVB.Dispose(); } if (railRoadsVB != null) { railRoadsVB.Dispose(); } if (roadsVB != null) { roadsVB.Dispose(); } if (heatMap != null) { heatMap.Dispose(); } if (infectMap != null) { infectMap.Dispose(); } if (arrowTex != null) { arrowTex.Dispose(); } if (atmosVB != null) { atmosVB.Dispose(); } if (atmosIB != null) { atmosIB.Dispose(); } if (atmosTexture != null) { atmosTexture.Dispose(); } if (atmosNextTexture != null) { atmosNextTexture.Dispose(); } if (contourBuildingsVB != null) { contourBuildingsVB.Dispose(); } railRoadsTex.Dispose(); if (gridVertexBuffer != null) { gridVertexBuffer.Dispose(); } if (gridIndexBuffer != null) { gridIndexBuffer.Dispose(); } if (gridTex != null) { gridTex.Dispose(); } base.Dispose(); }