Hello,
I tried to make a little test :
public static void printRemainingMem()
{
long totalMem = Runtime.getRuntime().totalMemory();
long freeMem = Runtime.getRuntime().freeMemory();
System.out.println("usedMem="+(totalMem - freeMem));
return ;
}
@Override
protected void loopIteration( long gameTime, long frameTime, TimingMode tm )
{
super.loopIteration(gameTime, frameTime, tm);
RectBillboard test = new RectBillboard(1, 1, "ressources/particle1.png");
test = null;
System.gc();
GraphicsCore.printRemainingMem();
return;
}
There seem to have a memory leak but i don't know how to remove this kind of object.
There's no problem to detach them but is there a method to delete "in a clean way" the instance ?
Thanks