Hi ,

This is my first post in this forum ... so, Hi to all of you!

I am having a memory consumption just making click to open a filechooser.
The application starts with about 45 mb but after 50 clicks on the filechooser buttom the appication reaches about 95 MB .

The OK buttom is never pressed ...so part of the code won't run.
As you can see i am using "null" for the object at the end of the code. So ..I suppose the garbage collector will clear the instances.

Then my question ....Why after a couple of minutes the application never decreases the memory usage ? Why the GC does nothing ? Even doing object = null

I know that each time I do click I am creating a new instance of the file chooser...thats is true but ....but is guess the GC has to do his job.

Please, can some one take a look to the next code ?
Maybe i am doing something horrible LoL

Thank you in advance!


Java Code:
 JFileChooser fc=null;

    fc = new JFileChooser(sDefaultPathChooserSave);
    int iRowSelected = jTable1.getSelectedRow();
    String filePathDicomImage = (String) model.getValueAt(iRowSelected, 1);

    File file = new File(sDefaultPathChooserSave);

    if (System.getProperty("os.name").toLowerCase().compareTo("linux")==0)

    int value = fc.showSaveDialog(fc);
    if (value == fc.APPROVE_OPTION)
       file = fc.getSelectedFile();
       sDefaultPathChooserSave = fc.getSelectedFile().toString();

            ThreadWorker oThread = new                    ThreadWorker(filePathDicomImage,file.getAbsolutePath());
            Thread Threadconverter = new Thread(oThread);
            file = null;