Results 1 to 2 of 2

Thread: Free Memory

  1. #1

    Free Memory

    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.
    <a href="http://www.greatgamesexperiment.com/game/Valgard/?utm_source=gge&amp;utm_medium=badge_game"><img border="0" alt="GGE" title="GGE" src="http://static.greatgamesexperiment.com/badge/game/valgard/gge400x56.png"></a>

  2. #2

    Free Memory

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •