On 4/11/06, Zohar Amir <[EMAIL PROTECTED]> wrote: > > Hello, > I use a CumulativeProtocolDecoder. In the doDecode method I have: > > ... > contentBuffer = ByteBuffer.allocate(contentLength); > contentBuffer.put(contentBytes); > contentBuffer.flip(); > Message myMessage = new Message(contentBuffer); > out.write(myMessage); > > > My question is do I have to call the ByteBuffer's release method?
It depends on what you do with Message class. As the JavaDoc says, if the contentBuffer is written back to the IoService, then it will be released when messageSent is invoked. Otherwise, you have to release it manually. HTH, Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP key fingerprints: * E167 E6AF E73A CBCE EE41 4A29 544D DE48 FE95 4E7E * B693 628E 6047 4F8F CFA4 455E 1C62 A7DC 0255 ECA6
