Subject Re: [Firebird-Java] Memory buildup
Author Claus Holst
>>We have found an explanation for the memory buildup.
>>
>>First. It was not (only) the updates, but ordinary selects that made
>>the buildup.
>>
>>The problem is that all statements get saved in
>>"isc_tr_handle_impl.stmts" on "executeQuery()".
>>
>>This is done using
>>"isc_tr_handle_impl.registerStatementWithTransaction(isc_stmt_handle
>>stmt)".
>>
>>They all get released doing commit using
>>"isc_tr_handle_impl.forgetResultSets()".
>>
>>I guess Statement.close() should clean itself from the list ?
>
>
> Yes, Statement.close() and even ResultSet.close() will help. This behavior
> is correct - result sets are automatically closed either on commit (feature
> of Firebird) or when Statement is closed (JDBC specification). If you do not
> do this, it will eat some system resources.
>
> Please send a confirmation of this behavior to the list.

Sorry, I think i did not express my self clearly.

We do use both ResultSet.close() and Statement.close(), but they do NOT make the cleanup.

I believe this is a bug in JayBird.

Thanks for the prompt response :-)
Claus