mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-23 17:43:08 -05:00
Properly unsubscribe from TerrainAtlasChanged events.
This commit is contained in:
parent
9a52cd317f
commit
658f2518fe
2 changed files with 6 additions and 0 deletions
|
@ -20,6 +20,10 @@ namespace ClassicalSharp {
|
|||
arraysCount = newArraysCount;
|
||||
}
|
||||
|
||||
public void Dispose() {
|
||||
Window.TerrainAtlasChanged -= TerrainAtlasChanged;
|
||||
}
|
||||
|
||||
class DrawInfo1D {
|
||||
public DrawInfo1DPart Solid = new DrawInfo1DPart();
|
||||
public DrawInfo1DPart Translucent = new DrawInfo1DPart();
|
||||
|
|
|
@ -52,9 +52,11 @@ namespace ClassicalSharp {
|
|||
ClearChunkCache();
|
||||
chunks = null;
|
||||
unsortedChunks = null;
|
||||
Window.TerrainAtlasChanged -= TerrainAtlasChanged;
|
||||
Window.OnNewMap -= OnNewMap;
|
||||
Window.OnNewMapLoaded -= OnNewMapLoaded;
|
||||
Window.EnvVariableChanged -= EnvVariableChanged;
|
||||
builder.Dispose();
|
||||
}
|
||||
|
||||
public void Refresh() {
|
||||
|
|
Loading…
Add table
Reference in a new issue