Hello!
I have the very often INFO from C3P0 pool connection:
B4X:
Sep 11, 2016 12:44:44 PM com.mchange.v2.c3p0.stmt.GooGooStatementCache assimilateNewCheckedOutStatement
INFO: Multiply prepared statement! Select A.Z_ZONE As ZONE, A.Z_CD_STATION As CD_STATION, A.Z_U_DTTM, count(*) As SEQ From zones A Join zones B ON A.Z_ZONE = B.Z_ZONE And A.Z_U_DTTM >= B.Z_U_DTTM Where A.Z_CD_STATION = ? Group By A.Z_ZONE, A.Z_CD_STATION Order By 1,3
I'm closing all connections and statements properly!
Memory analyzer of Eclipse, gives me relative to this INFO, memory leaks suspect!
As I wrote and deleted I got the same warning but I found that I had not closed a ResultSet in another part of the code. It is probably the same for you too.
Dim OSQL As SQL = opool.GetConnection
Try
...
Catch
Log("Error: " & LastException)
End Try
OSQL.Close
I've checked the ResultSet implementation. It closes the prepared statement when it is closed. It is most probably a bug in your code. Monitor the process with a profiler and see whether there is a real leak. Maybe the statements are closed but not immediately.
Hello Erel,
After a full Garbage Collection performed, I ran profiler for a few minutes and I saw that the displayed objects are growing very fast! The two images are taken within 10 seconds!
What do all they mean?
Is it actually a memory leak?
I have been watching last 3 days and after a full GC (once a day) I have seen that every day the heap size increases by ~35MB.
Is it reasonable?
Do you see any leak suspected object at the images?