diff options
author | Stephen Toub <stoub@microsoft.com> | 2017-01-25 14:54:42 +0300 |
---|---|---|
committer | Stephen Toub <stoub@microsoft.com> | 2017-01-25 14:54:42 +0300 |
commit | 395ef8c5a40b7f2716286ed16641d84d1fda9b85 (patch) | |
tree | 71d99056f0f27f6d7ac1f7c797471a3ce232127d /src/System.Runtime | |
parent | 62079764a1e0bd6812ddde94fc2c75cf2fb459b7 (diff) |
Fix ConditionalWeakTable test with GC.KeepAlive
Diffstat (limited to 'src/System.Runtime')
-rw-r--r-- | src/System.Runtime/tests/System/Runtime/CompilerServices/ConditionalWeakTableTests.netcoreapp.cs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/System.Runtime/tests/System/Runtime/CompilerServices/ConditionalWeakTableTests.netcoreapp.cs b/src/System.Runtime/tests/System/Runtime/CompilerServices/ConditionalWeakTableTests.netcoreapp.cs index 800d026235..f14cfe37ce 100644 --- a/src/System.Runtime/tests/System/Runtime/CompilerServices/ConditionalWeakTableTests.netcoreapp.cs +++ b/src/System.Runtime/tests/System/Runtime/CompilerServices/ConditionalWeakTableTests.netcoreapp.cs @@ -79,6 +79,9 @@ namespace System.Runtime.CompilerServices.Tests cwt.Clear(); Assert.Equal(0, ((IEnumerable<KeyValuePair<object, object>>)cwt).Count()); + + GC.KeepAlive(keys); + GC.KeepAlive(values); } [Fact] |