diff options
author | Jeremy Koritzinsky <jkoritzinsky@gmail.com> | 2019-01-23 17:02:09 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-23 17:02:09 -0800 |
commit | ad8975dd4b064381e1560536b77e5dcfb3195c84 (patch) | |
tree | a5581e4e60481a8e47032437a6f6c3f1a00c7258 /tests | |
parent | c17985240178000ecab0849045fee600e5a10a8d (diff) | |
download | coreclr-ad8975dd4b064381e1560536b77e5dcfb3195c84.tar.gz coreclr-ad8975dd4b064381e1560536b77e5dcfb3195c84.tar.bz2 coreclr-ad8975dd4b064381e1560536b77e5dcfb3195c84.zip |
Add GC.KeepAlive to keep collectible ALC alive across usage. (#22133)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/Interop/ICustomMarshaler/ConflictingNames/RunInALC.cs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/src/Interop/ICustomMarshaler/ConflictingNames/RunInALC.cs b/tests/src/Interop/ICustomMarshaler/ConflictingNames/RunInALC.cs index 1d61f2deaf..fdae979445 100644 --- a/tests/src/Interop/ICustomMarshaler/ConflictingNames/RunInALC.cs +++ b/tests/src/Interop/ICustomMarshaler/ConflictingNames/RunInALC.cs @@ -46,6 +46,7 @@ public class RunInALC object instance = Activator.CreateInstance(inContextType); MethodInfo parseIntMethod = inContextType.GetMethod("ParseInt", BindingFlags.Instance | BindingFlags.Public); Assert.AreEqual(1234, (int)parseIntMethod.Invoke(instance, new object[]{"1234"})); + GC.KeepAlive(context); } } |