Clearing memory

Hi,

I have an application that shows the result of a long simulation so it is constantly showing completely new content. After a number of iterations I get a “java.lang.InternalError: Not enough storage is available to process this command”.

All I do to clear up the resources is call GL.glDeleteLists when a particular object is no longer shown. Apparently that’s not enough. What else should one do to keep the memory clear?

Many thanks in advance.

Aaron

Are you sure it’s OpenGL related? If you’re doing a simulation which creates data, do you have any data that you’re accidentally accumulating and the garbage collector can’t reclaim for memory?

No, I have about 100 objects that show in an infinite loop. By showing, I mean generate a new list and delete it when the new object shows.

The fifth time around in the attempted infinite loop, I get that error.

(I realize that I could easily solve the problem by just maintaing 100 lists and invoking them when necessary. But that’s not the point, because the problem will come back when I go from 100 objects to 1000.)

Could you post some code, or boil it down to a simple test case, then we can see what is exactly going on.

Darn! - not JOGL related.

My bad and thank you.

Pahidla