akka-stream-apns icon indicating copy to clipboard operation
akka-stream-apns copied to clipboard

Netty ButeBuf recycle

Open georgeyanev opened this issue 5 years ago • 0 comments

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

georgeyanev avatar Mar 27 '19 15:03 georgeyanev