Using RSocket `PayloadDecoder.ZERO_COPY` correctly

Viewed 92

In the RSocket documentation it says that using PayloadDecoder.ZERO_COPY will reduce latency and increase performance but:

You must free the Payload when you are done with them or you will get a memory leak.

I'm using Spring and I can see lots of examples where ZERO_COPY is used - (e.g. here) - but no examples of special precautions to free the payload.

Can someone say what, if anything, needs to be done in this regard when using this feature.

0 Answers
Related