Skip to content

Commit df70f00

Browse files
Merge pull request #101 from AristurtleDev/fix/scene-dispose
Add `IsDisposed=true` to `Scene` disposal
2 parents f38b756 + 267abb1 commit df70f00

File tree

11 files changed

+22
-0
lines changed
  • Tutorials/learn-monogame-2d/src
    • 17-Scenes/MonoGameLibrary/Scenes
    • 18-Texture-Wrapping/MonoGameLibrary/Scenes
    • 19-User-Interface-Fundamentals/MonoGameLibrary/Scenes
    • 20-Implementing-UI-With-Gum/MonoGameLibrary/Scenes
    • 21-Customizing-Gum-UI/MonoGameLibrary/Scenes
    • 22-Snake-Game-Mechanics/MonoGameLibrary/Scenes
    • 23-Completing-The-Game/MonoGameLibrary/Scenes
    • 24-Shaders/MonoGameLibrary/Scenes
    • 25-Packaging-Game/MonoGameLibrary/Scenes
    • 26-Publish-To-Itch/MonoGameLibrary/Scenes
    • 27-Conclusion/MonoGameLibrary/Scenes

11 files changed

+22
-0
lines changed

Tutorials/learn-monogame-2d/src/17-Scenes/MonoGameLibrary/Scenes/Scene.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,7 @@ protected virtual void Dispose(bool disposing)
100100
UnloadContent();
101101
Content.Dispose();
102102
}
103+
104+
IsDisposed = true;
103105
}
104106
}

Tutorials/learn-monogame-2d/src/18-Texture-Wrapping/MonoGameLibrary/Scenes/Scene.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,7 @@ protected virtual void Dispose(bool disposing)
100100
UnloadContent();
101101
Content.Dispose();
102102
}
103+
104+
IsDisposed = true;
103105
}
104106
}

Tutorials/learn-monogame-2d/src/19-User-Interface-Fundamentals/MonoGameLibrary/Scenes/Scene.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,7 @@ protected virtual void Dispose(bool disposing)
100100
UnloadContent();
101101
Content.Dispose();
102102
}
103+
104+
IsDisposed = true;
103105
}
104106
}

Tutorials/learn-monogame-2d/src/20-Implementing-UI-With-Gum/MonoGameLibrary/Scenes/Scene.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,7 @@ protected virtual void Dispose(bool disposing)
100100
UnloadContent();
101101
Content.Dispose();
102102
}
103+
104+
IsDisposed = true;
103105
}
104106
}

Tutorials/learn-monogame-2d/src/21-Customizing-Gum-UI/MonoGameLibrary/Scenes/Scene.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,7 @@ protected virtual void Dispose(bool disposing)
100100
UnloadContent();
101101
Content.Dispose();
102102
}
103+
104+
IsDisposed = true;
103105
}
104106
}

Tutorials/learn-monogame-2d/src/22-Snake-Game-Mechanics/MonoGameLibrary/Scenes/Scene.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,7 @@ protected virtual void Dispose(bool disposing)
100100
UnloadContent();
101101
Content.Dispose();
102102
}
103+
104+
IsDisposed = true;
103105
}
104106
}

Tutorials/learn-monogame-2d/src/23-Completing-The-Game/MonoGameLibrary/Scenes/Scene.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,7 @@ protected virtual void Dispose(bool disposing)
100100
UnloadContent();
101101
Content.Dispose();
102102
}
103+
104+
IsDisposed = true;
103105
}
104106
}

Tutorials/learn-monogame-2d/src/24-Shaders/MonoGameLibrary/Scenes/Scene.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,7 @@ protected virtual void Dispose(bool disposing)
100100
UnloadContent();
101101
Content.Dispose();
102102
}
103+
104+
IsDisposed = true;
103105
}
104106
}

Tutorials/learn-monogame-2d/src/25-Packaging-Game/MonoGameLibrary/Scenes/Scene.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,7 @@ protected virtual void Dispose(bool disposing)
100100
UnloadContent();
101101
Content.Dispose();
102102
}
103+
104+
IsDisposed = true;
103105
}
104106
}

Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/MonoGameLibrary/Scenes/Scene.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,7 @@ protected virtual void Dispose(bool disposing)
100100
UnloadContent();
101101
Content.Dispose();
102102
}
103+
104+
IsDisposed = true;
103105
}
104106
}

0 commit comments

Comments
 (0)