From f27857ef1c12f963f4520ffdec2eaa8a194fc5a5 Mon Sep 17 00:00:00 2001 From: Human Gamer Date: Wed, 18 Sep 2019 15:20:01 -0400 Subject: [PATCH] Renamed BurnoutImage.cs to GameImage.cs --- BundleUtilities/TextureCache.cs | 5 ++++- BurnoutImage/BurnoutImage.csproj | 2 +- BurnoutImage/{BurnoutImage.cs => GameImage.cs} | 0 3 files changed, 5 insertions(+), 2 deletions(-) rename BurnoutImage/{BurnoutImage.cs => GameImage.cs} (100%) diff --git a/BundleUtilities/TextureCache.cs b/BundleUtilities/TextureCache.cs index 5b676bd..3ae29b1 100644 --- a/BundleUtilities/TextureCache.cs +++ b/BundleUtilities/TextureCache.cs @@ -13,11 +13,14 @@ public static class TextureCache public static void ResetCache() { - foreach (uint key in _cachedTextures.Keys) + foreach (ulong key in _cachedTextures.Keys) { Image img = _cachedTextures[key]; img.Dispose(); } + GC.Collect(); + GC.WaitForPendingFinalizers(); + GC.Collect(); _cachedTextures.Clear(); } diff --git a/BurnoutImage/BurnoutImage.csproj b/BurnoutImage/BurnoutImage.csproj index f5d853b..5a9525b 100644 --- a/BurnoutImage/BurnoutImage.csproj +++ b/BurnoutImage/BurnoutImage.csproj @@ -54,7 +54,7 @@ - + diff --git a/BurnoutImage/BurnoutImage.cs b/BurnoutImage/GameImage.cs similarity index 100% rename from BurnoutImage/BurnoutImage.cs rename to BurnoutImage/GameImage.cs