Skip to content

Commit fd4f14f

Browse files
committed
Mark memorySpriteCache as volatile for thread safety
1 parent a354f51 commit fd4f14f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Assets/_PackageRoot/Runtime/ImageLoader.MemoryCache.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace Extensions.Unity.ImageLoader
77
{
88
public static partial class ImageLoader
99
{
10-
internal static ConcurrentDictionary<string, Sprite> memorySpriteCache = new ConcurrentDictionary<string, Sprite>();
10+
internal static volatile ConcurrentDictionary<string, Sprite> memorySpriteCache = new ConcurrentDictionary<string, Sprite>();
1111

1212
#if UNITY_EDITOR
1313
[UnityEditor.InitializeOnEnterPlayMode]

0 commit comments

Comments
 (0)