diff options
author | Jan Tattermusch <jtattermusch@google.com> | 2018-09-25 20:37:02 +0200 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@google.com> | 2018-09-25 20:37:02 +0200 |
commit | 10447318588a281d737af159a5dceec142135a43 (patch) | |
tree | 4fde428aa8a8fd81a615781013c8e5a85fbdb8ef /src/csharp | |
parent | a2a4629614bb79e3a4d7ea6594e31e33d63a65be (diff) |
add DeserializationContext implementation note
Diffstat (limited to 'src/csharp')
-rw-r--r-- | src/csharp/Grpc.Core/DeserializationContext.cs | 2 |
1 files changed, 2 insertions, 0 deletions
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 <c>DeserializationContext</c> implementations are free to assume so. /// </summary> /// <returns>byte array containing the entire payload.</returns> public abstract byte[] PayloadAsNewBuffer(); |