Browse Source
Merge pull request #8023 from MarchingCube/fix-weaklist
Fix WeakHashList losing one item when upgrading storage.
pull/8027/head
Nikita Tsukanov
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
1 deletions
-
src/Avalonia.Base/Utilities/WeakHashList.cs
|
|
|
@ -104,8 +104,10 @@ internal class WeakHashList<T> where T : class |
|
|
|
if (existing!.TryGetTarget(out var target)) |
|
|
|
Add(target); |
|
|
|
} |
|
|
|
_arr = null; |
|
|
|
|
|
|
|
Add(item); |
|
|
|
|
|
|
|
_arr = null; |
|
|
|
} |
|
|
|
|
|
|
|
public void Remove(T item) |
|
|
|
|