I have a question regarding the threads that my application spawns during execution and on their status.
I have a Swing application and I noticed a couple of strange behaviours in some test scenarios, using Java VisualVM. Running my program for 30+minutes doing nothing (just started and leaving it there running) I noticed the following.
First of all, in the the Threads tab I see a lot of alive threads.
Reading (among other things)
Default threads like, DestroyJavaVM, Reference Handler, Signal Dispatcher and What are these threads which are spwaned when a Java application begins its execution? I understand most of these threads have a very good reason to be there. (I am still trying to figure out the "RMI TCP" ones)
I have doubts however on their state. Is it normal that the first six of them have been in Running state 100% of time?
Also, could any of these threads explain a heap consumption like the following?
I noticed that a lot of instances of HashMap$Entry and TreeMap$Entry are referenced and created by libraries originating from sun.rmi.* and I thought it could be related to the "RMI TCP" threads...
Last but not least, if I try to dispose() my main JFrame, the frame itself will desappear, but the application will still be running....could those threads be the reason (or part of it)??
Thank you everybody.