From 98c6de2444cb5b26df9c716ece535a59d0c99f5c Mon Sep 17 00:00:00 2001 From: Yusuke Ito Date: Tue, 26 Nov 2019 03:03:39 +0900 Subject: [PATCH] add warning in objectpool --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a519229..0471845 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,10 @@ finally } ``` -**WARNING: You must call `SetLength(0)` at first, and call `Return(stm)` in the end for preventing memory leak.** +#### WARNING + +* **You must call `SetLength(0)` at first, and call `Return(stm)` in the end for preventing memory leak.** +* **`PooledMemoryStream` is not threadsafe, so you must not share instance across threads** # Micro benchmark result(powered by [BenchmarkDotNet](http://benchmarkdotnet.org/))