On 27/07/16 17:46, Paul Houle wrote:
a lot of times I want to write some function
that just returns a ResultSet and lets the called do what it wants with
it, but no you can't just close the ResultSet.
An example of how to do it added to the JENA-1215.
Summary: a class "ResultSetCloseable"
(I added the ResultSetWrapper to the codebase).
which gets me in the
habit of putting ResultSet(s) into lists despite the cost of the copy
and the risk that a big result set will blow up the garbage collector.
The copy does not need to be a deep copy, only a list, not the elements
of the list which are immutable and not attached to storage.
Andy