Re: Memory leaks using refcursors
От | Guillaume Smet |
---|---|
Тема | Re: Memory leaks using refcursors |
Дата | |
Msg-id | 1d4e0c10701180646p56c18dcal2cb3526bd1050e63@mail.gmail.com обсуждение исходный текст |
Ответ на | Memory leaks using refcursors ("Guillaume Smet" <guillaume.smet@gmail.com>) |
Ответы |
Re: Memory leaks using refcursors
|
Список | pgsql-jdbc |
Hi all, Summary of our discussion with Dave on IRC. The following patch provided by Dave fixed the problem for the first 31 iterations of our test but failed after that because the garbage collector calls the close() method a second time when the object is dereferenced (finalize() method of AbstractJDBC2Statement). So we have to be sure that when the close() method is called a second time, it doesn't fail. On 1/18/07, Dave Cramer <davec@postgresintl.com> wrote: > + > + if ( this.refCursorName != null ) > + { > + connection.execSQLUpdate("close \"" + refCursorName +'"'); I added a refCursorName = null; here to be sure the close cursor is not executed twice and it works correctly. > + } I don't have the memory leaks anymore. I'll ask the people developing the real application to test this patch to be sure everything is now OK and I'll post the confirmation here. Dave, thanks a lot for your help. -- Guillaume
В списке pgsql-jdbc по дате отправления: