memory management dude in java se 6
Hi all!
I don't know if that question involves that forum. I'm developing an application. I execute code like this in java se 6 beta version:
publicclass MyApplication
{
publicstaticvoid main(String Args[])
{
MyMatrix foo;
for(int i = 100; i <100000; i += 100)
{
foo =new MyMatrix(i, i);
doSomethingWith(foo);
}
}
}
publicclass MyMatrix
{
privatedouble[][] theMatrix;
public MyMatrix(int rows,int columns)
{
theMatrix =newdouble [rows][columns];
}
}
When i
in the main method gets value 1700, I get an out of memory error. I'm using Windows XP and I have 512 RAM. My machine seems to have a lot of free memory. Is last matrix memory freed correctly when I execute foo =new MyMatrix(i, i);
?
Is it a compiler's problem?
Anyone can help me, please?
Thank you in advance.

