From 7ef69edf3397caf0d09bd6d63042df7472d439b1 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 4 Jun 2020 19:52:34 +0100 Subject: [PATCH] flotsam: also expire weakreferences --- OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index a8cb990f79..e401c39d9e 100755 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs @@ -690,6 +690,12 @@ namespace OpenSim.Region.CoreModules.Asset if (File.GetLastAccessTime(file) < purgeLine) { File.Delete(file); + string id = Path.GetFileName(file); + if(!String.IsNullOrEmpty(id)) + { + lock (weakAssetReferencesLock) + weakAssetReferences.Remove(id); + } } }