From f5f0fa5d1fd30855073dbcad2455378cdf15b771 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 31 May 2017 06:18:05 +0100 Subject: [PATCH] we don't need to keep refs to baked textures assets --- .../Avatar/AvatarFactory/AvatarFactoryModule.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 14607e9996..8fcb511663 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs @@ -494,16 +494,17 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory else m_log.DebugFormat("[UpdateBakedCache] cache hits: {0} changed entries: {1} rebakes {2}", hits.ToString(), validDirtyBakes.ToString(), missing.Count); -/* + for (int iter = 0; iter < AvatarAppearance.BAKE_INDICES.Length; iter++) { int j = AvatarAppearance.BAKE_INDICES[iter]; - m_log.Debug("[UpdateBCache] {" + iter + "/" + - sp.Appearance.WearableCacheItems[j].TextureIndex + "}: c-" + - sp.Appearance.WearableCacheItems[j].CacheId + ", t-" + - sp.Appearance.WearableCacheItems[j].TextureID); + sp.Appearance.WearableCacheItems[j].TextureAsset = null; +// m_log.Debug("[UpdateBCache] {" + iter + "/" + +// sp.Appearance.WearableCacheItems[j].TextureIndex + "}: c-" + +// sp.Appearance.WearableCacheItems[j].CacheId + ", t-" + +// sp.Appearance.WearableCacheItems[j].TextureID); } -*/ + return (hits == cacheItems.Length); } @@ -583,6 +584,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory wearableCache[idx].TextureAsset.Temporary = true; wearableCache[idx].TextureAsset.Local = true; cache.Cache(wearableCache[idx].TextureAsset); + wearableCache[idx].TextureAsset = null; continue; } @@ -683,6 +685,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory face.TextureID = wearableCache[idx].TextureID; hits++; + wearableCache[idx].TextureAsset = null; } } }