From 65da96af6c08c182f05df388c8d4872311b2f088 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Thu, 4 Apr 2019 09:23:40 -0400 Subject: Don't null out buffer in MemoryStream on Capacity reset (#23700) --- src/System.Private.CoreLib/shared/System/IO/MemoryStream.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/System.Private.CoreLib/shared/System/IO/MemoryStream.cs b/src/System.Private.CoreLib/shared/System/IO/MemoryStream.cs index 12baaa6eea..c8b72d45f8 100644 --- a/src/System.Private.CoreLib/shared/System/IO/MemoryStream.cs +++ b/src/System.Private.CoreLib/shared/System/IO/MemoryStream.cs @@ -299,7 +299,7 @@ namespace System.IO } else { - _buffer = null; + _buffer = Array.Empty(); } _capacity = value; } -- cgit v1.2.3