You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -35,8 +37,6 @@ public void Initialization(Dictionary<string, int> usage)
35
37
}
36
38
}
37
39
38
-
privatevolatileboolremoving;
39
-
40
40
publicImageSourcethis[stringpath]
41
41
{
42
42
get
@@ -62,15 +62,22 @@ public ImageSource this[string path]
62
62
}
63
63
);
64
64
65
-
// To prevent the dictionary from drastically increasing in size by caching images, the dictionary size is not allowed to grow more than the permissibleFactor * maxCached size
66
-
// This is done so that we don't constantly perform this resizing operation and also maintain the image cache size at the same time
// To prevent the dictionary from drastically increasing in size by caching images, the dictionary size is not allowed to grow more than the permissibleFactor * maxCached size
70
+
// This is done so that we don't constantly perform this resizing operation and also maintain the image cache size at the same time
71
+
if(Data.Count>permissibleFactor*MaxCached)
72
+
{
73
+
awaitsemaphore.WaitAsync();
74
+
// To delete the images from the data dictionary based on the resizing of the Usage Dictionary
0 commit comments