de reference Objects if possible
HI
I have an application which runs a simulation model (of some scientific parameters over a period of time) and produces some nice output graphs (from an array of processed output data)
However if the model was to be run again, the same (but new Objects) are created and thus each simulation adds around 10Megs of memory.
So I have a memory leak, and I guess there are two ways to fix this:
1.Use the Same Object again (just reset a few variables and arrays)
2.De Reference an Object (delete it and free memory)
I would prefer to do the latter, as creating the Object again is probably easier and quicker than wiping a large array of data etc,etc
I know Java has its own Garbage collector but obliviously for some reason I am keeping a reference to the object due to the nature of the code, design etc.
I have tried myObject = null;
But that doesnt seem to work.
Any suggestions? Code examples?
Cheers

