I have an application with some memory troubles so I began to play with profilers, like VisualVM.
If I launch my application in debug and reach a breakpoint (which paused the application), I still see a lot of instances of several classes being created (mainly int
, char
, Object
, TreeMap$Entry
, ...).
Why is that?
The breakpoint has probably only suspended the thread that hit it, while the other threads happily keep doing their intended work. To find out what they do, their names may reveal a little, but nothing beats a thread dump (which you can have VisualVM do for you).
Also, you can usually decide for a single breakpoint whether it should suspend just the one thread, or if it should suspend all threads. Exactly how you do this is IDE-specific, of course (but usually in "breakpoint properties", or some such).