From 10447318588a281d737af159a5dceec142135a43 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 25 Sep 2018 20:37:02 +0200 Subject: add DeserializationContext implementation note --- src/csharp/Grpc.Core/DeserializationContext.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/csharp') diff --git a/src/csharp/Grpc.Core/DeserializationContext.cs b/src/csharp/Grpc.Core/DeserializationContext.cs index 96de08f76d..5b6372ef85 100644 --- a/src/csharp/Grpc.Core/DeserializationContext.cs +++ b/src/csharp/Grpc.Core/DeserializationContext.cs @@ -37,6 +37,8 @@ namespace Grpc.Core /// Also, allocating a new buffer each time can put excessive pressure on GC, especially if /// the payload is more than 86700 bytes large (which means the newly allocated buffer will be placed in LOH, /// and LOH object can only be garbage collected via a full ("stop the world") GC run). + /// NOTE: Deserializers are expected not to call this method more than once per received message + /// (as there is no practical reason for doing so) and DeserializationContext implementations are free to assume so. /// /// byte array containing the entire payload. public abstract byte[] PayloadAsNewBuffer(); -- cgit v1.2.3