upthewaterspout commented on a change in pull request #6113:
URL: https://github.com/apache/geode/pull/6113#discussion_r592813594



##########
File path: 
geode-redis/src/main/java/org/apache/geode/redis/internal/executor/RedisResponse.java
##########
@@ -52,59 +52,59 @@ public void afterWrite() {
   }
 
   public ByteBuf encode(ByteBufAllocator allocator) {
-    return coderCallback.apply(allocator);
+    return coderCallback.apply(allocator.buffer());

Review comment:
       At some point I want to push this allocation further up the stack. I 
believe this ends up being safe because we always pass the returned before to a 
netty method which will end up freeing it. But I would prefer if it was always 
clear when we allocate a buffer that it will be freed.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to