Subject Re: [Firebird-Java] Possible memory leak in EncodingFactory ?
Author Roman Rokytskyy
> I do not like double memory allocation in decodeFromCharset().
>
> It is used in reading the data from database. Usually the number of
> reads is greater then writes, and I do not like the slowdown of major
> number database operations.

I fully support you - this part should be optimized as much as possible.

> What about keeping the shared char[] buffer and creating single
> Encoding object per Statement/ResultSet.
>
> I do not see a point in simultaneously reading different fields of
> ResultSet from different threads :-) So it should be safe enough.

As far as I understand the specification there is no requirement to provide
multithreaded access to the objects other than Connection. But I will check
the specification.

Then I would suggest you to fetch the latest version of the driver from CVS
directly, so you create correct diffs.

Roman