Hi. I have build an application and I used swing. Technically the app is working fine, but the memory used is increasing with time. This happens when the user is viewing a JPanel containing a JTable.
If the user doesn't see the JTable( the table is not visible) the app doesn't need more than 40-45 MB RAM after 2 hours of running.
The application executes some code on 10 threads. The JTable has 10 rows ( one row for every
thread) and every row has a JProgressBar which shows the percentage of the code that has been completed(I split the running code in more steps). To update the JProgressBar value I need to update the JTable so I use the following code:
and it's working great but the memory used the program is increasing even if I run garbage collector. I know this is the code that is causing the problem because when I remove it the memory is not increasing, so what I am looking is a solution to my problem.
Should I use some synchronized solution to update the table, so I can avoid simultaneous updates?
Thank you for your help and sorry for my bad english.