Call GC.SuppressFinalize() from Dispose().

GitOrigin-RevId: 57b1d3760a781966e3dd673970b535bb8cade1a2
This commit is contained in:
Colin McMillen 2020-02-19 17:18:00 -05:00
parent af9a48bc5d
commit 2fe8e53e77
2 changed files with 2 additions and 0 deletions

View File

@ -30,6 +30,7 @@ namespace SemiColinGames {
public void Dispose() { public void Dispose() {
vertexBuffer.Dispose(); vertexBuffer.Dispose();
indexBuffer.Dispose(); indexBuffer.Dispose();
GC.SuppressFinalize(this);
} }
public void Update(Player player, AABB[] collisionTargets) { public void Update(Player player, AABB[] collisionTargets) {

View File

@ -45,6 +45,7 @@ namespace SemiColinGames {
lightingTarget.Dispose(); lightingTarget.Dispose();
lightingEffect.Dispose(); lightingEffect.Dispose();
spriteBatch.Dispose(); spriteBatch.Dispose();
GC.SuppressFinalize(this);
} }
public void Draw(World world, Player player, LinesOfSight linesOfSight) { public void Draw(World world, Player player, LinesOfSight linesOfSight) {