-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Query Operations
-
None
DBCursor has a field that is populated with an instance of a class with a finalize() method, which is used to close a dangling cursor. But the class is an inner class, and therefore references the DBCursor instance, which in turn references the last query batch. This stresses out the garbage collector, which now has to keep all those objects alive until finalize() is called.
A better design would be to make the class with the finalizer a static inner class that only references the cursor id and server address.