Subject Re[2]: [Firebird-Java] Possible memory leak in EncodingFactory ?
Author Alexey Panchenko
Roman Rokytskyy wrote:

> Rick proposed a change where we removed the need in sharedBufferB and
> sharedBufferC, the Encoding instances remain cached on XSQLVAR level.

> So, considering all said above, do you still think we need another caching?

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.

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.

--
Best regards,
Alexey mailto:alex+news@...