ByteBuffer.allocateView

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

ByteBuffer.allocateView

qbaze
Hey guys,

I've been developing an application using your framework for some time
and one thing has just hit my mind. Within the last release you've added
functionality of asynchronous queues. Here comes a question.
In the TCPAsyncQueueWriter write method implementation if
isCloneByteBuffer is set to true ByteBuffer.allocateView is called to
create a copy. It's flushed one time when it's ready and then removed
from the queue. But there is no way to tell the preallocated buffer that
the slice is not in use anymore. It leads to kinda 'memory leak' as this
memory cannot be neither reused nor gc'ed. Let me know if I missed
something here.

best regards,
Piotr

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]