PDA

View Full Version : Free Memory



Huehnerschaender
01-09-2004, 11:16 PM
Hi there, it's me again.
I have a problem freeing memory.
I have an intro with a kind of playersettings, which rotades/fades into the screen when pressing a button. This playersettingmenu needs about 700 kb of graphics.
You can press a cancelbutton while entering players data and then the dialog is fading out of the screen again.
Now my question:
I am creating the playersettings-class on the fly when pressing the button to enter players data. When pressing ok or cancel I destroy the class and when pressing again I recreate it.
Everytime I destroy the class I call Finalize and free for every image, but when I recreate the class, there is 700 kb more memory usage of my program. So how can I free the memory when destroying the class?
If someone would press settings/cancel again and again, the memory usage could become very very high. What am I doing wrong? Even setting the AGFImages to nil shows no effect.

It would be very nice if someone can help me with this.

LP
02-09-2004, 01:22 PM
How exactly do you free the class? There's only one potential memory leak in PowerDraw3 (which I detected recently when creating Asphyre). When you unload the graphics data, try to re-initialize PowerDraw and see if the memory is released.