akka-stream-apns
akka-stream-apns copied to clipboard
Netty ButeBuf recycle
Here when we use the ByteBuf's array to form a ByteString how and when release of ByteBuf input happens?
Since it is not released here the next handler will receive a ByteString and could not release it and that would be a memory leak. Right?
And even if it is released here then the backing array is in danger as it will be recycled.
https://github.com/reactive-hub/akka-stream-apns/blob/fea694a2cdae5a8e7676fca0b6dbdf16519e722a/connector/src/test/scala/reactivehub/akka/stream/apns/helper/ByteStringDecoder.scala#L14