Tim Cooke wrote:I am yet to need anything more than VisualVM to find memory leaks. In my case it's usually some kind of object creation in a loop that gets out of hand, and that usually turns up in VisualVM as a collection with a lot of things in it.
I worked in a shop that was too cheap to buy tools and had to use the stuff that comes in the JDK.
Took me several days to discover that the Oracle JDBC driver I was using had neither FIFO nor LIFO, but LIFI (last-in, FOREVER in). Test runs would take about 2-1/2 days each before critical mass was reached and the system blew. And, unfortunately, the data being traversed would hit that easily in production.
Once I discovered that fact, I found it was actually in Oracle's documentation. Down the stairs in an unused bathroom behind a locked filing cabinet bearing a sign marked "Beware of the leopard". But as a general rule we expect drivers to limit themselves. so I missed the faint note and had to discover it the hard way.