The ResultSet and Statement objects must be explicitly closed after the operation is complete.
This requirement applies to all ResultSet and Statement objects created by using the OceanBase JDBC driver (OceanBase Client).
The JDBC driver has no post-processing mechanism. Therefore, routines of the ResultSet and Statement classes are cleared by using the close method. If the ResultSet or Statement object is not explicitly closed, serious memory leaks may occur and cursors in the database may be exhausted. After both the ResultSet and Statement objects are closed, the corresponding cursor in the database is released. When only the ResultSet object is closed, the cursor is not released.
Example: Disabling both the ResultSet object rs and Statement object st.
rs.close();
st.close();