Re: Can a FastWriter ever be recycled in the current model?

"Eric B. Ridge" <[email protected]> Thu, 16 Mar 2006 11:06:18 -0500
Newsgroups gmane.comp.java.webmacro.user
Message-ID <[email protected]>
On Mar 16, 2006, at 6:01 AM, Alex Twisleton-Wykeham-Fiennes wrote:
> My questions are:-
>
> - is the FastWriter ever actually recycled?  It feels a bit like  
> there was a
> thought to recycle the FastWriters at some point, but currently (I  
> think) all
> FastWriters are being allocated via the FastWriter.getInstance()  
> methods that
> all allocate a new FastWriter instance.

FastWriter keeps a pool of FastWriter instances, doesn't it?  I know  
it did, maybe that got removed for 2.0?  Or are you saying that the  
pooling is broken and FastWriter.getInstance() always returns new  
instances.

<long pause>

Okay, the pool stuff has been ripped out of FastWriter.   
Interesting.  Since this is the now the case, I see no need for any  
of the .reset() business.  You're absolutely right, there's no point  
in re-allocating a smaller byte[] if the FastWriter instance is about  
to be gc'd.  I say get rid of it.

eric


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642