This is possibly a naive question. I am in the process of investigating a probable memory leak in my application. I've been monitoring the tomcat process via jvisualvm. At one point I opted to do a heap dump.
I was surprised to see my thread count, and memory consumption drop considerably after the heap dump was generated. Reference the following screen shots.
Why did my thread count and memory drop just because of a heap dump?
[EDIT] In response to the answers about it doing a full garbage collection in response to the heap dump, my followup question would be, shouldn't garbage collection be happening all the time? I see no prior dramatic drops, just the regular ones that occur when GC happens normally. What is different with this GC cycle than what happens normally?