Firstly, thanks for all your hard work on the NG4J library. I've found it
extremely useful over the past couple of years.
I've found a memory leak in the database persistence implementation in
version 0.9.3 caused by ResultSet objects not being closed when a (positive)
check is made for the existence of a Quad. The following conditions
reproduce the bug:
- A call is made to QuadDB.find(..) to check the existence of a Quad
- The hasNext() call on the returned iterator returns true
- No further methods are invoked on the iterator
The implementation of the QuadDB.find(..) currently only closes the
ResultSet object when hasNext() returns false, or an exception occurs.
There are two methods that call QuadDB.find(..) where this will always occur
when a match is found:
And this could potentially occur in the following methods if the iterator is
not completely traversed:
Hope this is of use to you,