Is there any point in calling the close method on ResultSet and the
close method of PreparedStatement?

BTW, I'm using embedded mode.  Why won't the garbage collector take
care of this?

In general, the garbage collector does take care of this.

But there have been bugs in the past, which caused Derby to fail to
collect result sets and statements. For example, DERBY-210, which is
mostly fixed, but still doesn't perfectly collect all resources:
https://issues.apache.org/jira/browse/DERBY-210

And, as with most garbage-collected items, by closing them yourself
you can accelerate and simplify the process, thus using fewer
resources overall.

thanks,

bryan

Reply via email to