You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by da...@daune-consult.com on 2005/09/19 08:53:23 UTC

[Mina] CumulativeProtocolDecoder testing

Hi,

I am surprised to see that the ByteBuffer used by CumulativeProtocolDecoder is
not explicitly released.

Given the ByteBuffer javadoc, I would assume that it should be.

Am I wrong ?

Regards,

J-F


Re: [Mina] CumulativeProtocolDecoder testing

Posted by Trustin Lee <tr...@gmail.com>.
Hi J-F,

2005/9/19, daune.jf@daune-consult.com <da...@daune-consult.com>:
> 
> I am surprised to see that the ByteBuffer used by 
> CumulativeProtocolDecoder is
> not explicitly released.
> 
> Given the ByteBuffer javadoc, I would assume that it should be.


You're right. It doesn't release the bytebuffer allocated in its 
constructor. It will not be returned to the buffer pool but GC's by JVM. We 
have to find the better way to this. Any good ideas?

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/

Re: [Mina] CumulativeProtocolDecoder testing

Posted by Justin Rudd <ju...@gmail.com>.
The ByteBuffer isn't a java.nio.ByteBuffer.  It is actually a wrapper
that exists in MINA.  When MINA finishes with the buffer (either
writes it or the protocol is finished with it), it will release it.

On 9/18/05, daune.jf@daune-consult.com <da...@daune-consult.com> wrote:
> Hi,
> 
> I am surprised to see that the ByteBuffer used by CumulativeProtocolDecoder is
> not explicitly released.
> 
> Given the ByteBuffer javadoc, I would assume that it should be.
> 
> Am I wrong ?
> 
> Regards,
> 
> J-F
> 
> 


-- 
Justin Rudd
"Get the facts first.  You can distort them later."
   - Mark Twain
http://seagecko.org/thoughts/