From 5c870040759ba3c9b0b942756acaecf9d87be80c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Mesari=C4=87?= <1780620+dalibormesaric@users.noreply.github.com> Date: Sat, 26 Oct 2024 14:03:51 +0200 Subject: [PATCH] Update memory.md --- aspnetcore/performance/memory.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aspnetcore/performance/memory.md b/aspnetcore/performance/memory.md index 0c9bea585b22..4b9290ed604f 100644 --- a/aspnetcore/performance/memory.md +++ b/aspnetcore/performance/memory.md @@ -79,7 +79,7 @@ The chart displays two values for the memory usage: ### Transient objects -The following API creates a 10-KB String instance and returns it to the client. On each request, a new object is allocated in memory and written to the response. Strings are stored as UTF-16 characters in .NET so each character takes 2 bytes in memory. +The following API creates a 20-KB String instance and returns it to the client. On each request, a new object is allocated in memory and written to the response. Strings are stored as UTF-16 characters in .NET so each character takes 2 bytes in memory. ```csharp [HttpGet("bigstring")] @@ -156,7 +156,7 @@ When multiple containerized apps are running on one machine, Workstation GC migh The GC cannot free objects that are referenced. Objects that are referenced but no longer needed result in a memory leak. If the app frequently allocates objects and fails to free them after they are no longer needed, memory usage will increase over time. -The following API creates a 10-KB String instance and returns it to the client. The difference with the previous example is that this instance is referenced by a static member, which means it's never available for collection. +The following API creates a 20-KB String instance and returns it to the client. The difference with the previous example is that this instance is referenced by a static member, which means it's never available for collection. ```csharp private static ConcurrentBag _staticStrings = new ConcurrentBag();