rsocket / rsocket-java

Java implementation of RSocket
http://rsocket.io
Apache License 2.0
2.35k stars 354 forks source link

Releasing memory in ZERO_COPY mode. #1093

Open german-komarov-dev opened 1 year ago

german-komarov-dev commented 1 year ago

I want to ask question here as there is the similar question in StackOverFlow which is not answered (https://stackoverflow.com/questions/67898403/using-rsocket-payloaddecoder-zero-copy-correctly).

So my question is when I use .payloadDecoder(PayloadDecoder.ZERO_COPY) where and how do I need to release payload? As I see in the source code the DefaultPayload the "release" method does nothing just return false. So I want to use ZERO_COPY feature but I didn't find in the Internet any information where and how to free memory. So I would be very grateful for explanation from this library authors.