Slight memory usage optimization

This commit is contained in:
erri120 2019-10-09 19:20:17 +02:00
parent 4773609758
commit 0ed4c9863e
No known key found for this signature in database
GPG Key ID: A8C0A18D8D4D3135

View File

@ -409,7 +409,11 @@ namespace Wabbajack
if (_cachedSlides.ContainsKey(randomElement.ModID))
{
var bitmap = new BitmapImage();
_cachedSlides.TryGetValue(randomElement.ModID, out bitmap);
bitmap = null;
_cachedSlides.Remove(randomElement.ModID);
//hmmm
//GC.Collect();
}
} while (_cachedSlides.Count >= MAX_CACHE_SIZE);