Will the memory be free after executing glDeleteLists()

Currently, I’m writing codes using OpenGL to render 2D and 3D models of ocean currents, temperature, salinity and so on. Since a number of numerical data involved in these models, it is hard and unreasonable to increase machine memory continuely to execute and/or improve the effects of rendering. Therefore, I’m considering to use glDeleteLists() command following glCallList() immediately to release the space. Unfortunately, it doesn’t work well. Are there any other ways to carry out implementation without increasing machine memory?

Why are you creating a display list of you only want to call it once and then delete it?

Originally posted by jwatte:
Why are you creating a display list of you only want to call it once and then delete it?

Dear Jwatte,

Actually, I’m frequently using this list that identifies the same attributes. For instance, there are 10 diferent levels in ocean depth. Each level has its own ocean currents (defined by velocity), sea water temperature and salinity as well. There are 30 time steps at each level with respect to the changes of velocity, temperature and salinity. Therefore, I’m creating a show list starting from index0 to index29, for example, at level 0 (surface of ocean). After executing glCallList(), the gl DeleteLists() function is executed immediately for the purpose of next use of this list in order not to increase the memory occupied.
However, I find glDeleteLists() is working without increasing memory occupied significantly. But there are still about 34MBytes memory occupied after rendering each level. I don’t know what the reason is. Are there any other good way to do this job? Any comments will highly be appreciated!

You are not frequently using the list if you calling glDeleteLists immediately after you have rendered it (once?). Deletion and especially rebuilding the new list takes some time.
If you want complete control about the memory allocations in your program you shouldn’t use display lists. You can’t control the OpenGL implementation’s memory handling.
If you’re concerned about memory consumption, render geometry data using vertex arrays instead and reuse them for the different levels.

Originally posted by Relic:
You are not frequently using the list if you calling glDeleteLists immediately after you have rendered it (once?). Deletion and especially rebuilding the new list takes some time.
If you want complete control about the memory allocations in your program you shouldn’t use display lists. You can’t control the OpenGL implementation’s memory handling.
If you’re concerned about memory consumption, render geometry data using vertex arrays instead and reuse them for the different levels.

Thank you very much! It works well without building gl_List.