users@grizzly.java.net

ByteBuffer.allocateView

From: Oleksiy Stashok <Oleksiy.Stashok_at_Sun.COM>
Date: Mon, 07 Jan 2008 14:55:00 +0100

Hello,

due to some problems, several emails where not delivered to the list.
So, I'm resending them.

From: bazi <bazi_at_world.pl>

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