Avoid keeping runtext alive in Regex cache (#31736)
authorStephen Toub <stoub@microsoft.com>
Wed, 5 Feb 2020 13:24:05 +0000 (08:24 -0500)
committerGitHub <noreply@github.com>
Wed, 5 Feb 2020 13:24:05 +0000 (08:24 -0500)
commit4352d7c5d9d3cb8741703f001fe3c2f283fc8cff
tree4ccb1053f8582de382eee79f6ddc8dd42609bbdb
parentac249c4e3bb5b3f1d1451f16cfdf6d05401bc05e
Avoid keeping runtext alive in Regex cache (#31736)

Null out any references to the string in case the Regex object is kept alive in a cache and the string object is very large.
src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Capture.cs
src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexRunner.cs