Why free memory on application quit?

Member
Posts: 72
Joined: 2006.10
Post: #3
It's mostly a question of good practice. You allocate, you free. In some cases, this can save you a bunch of headaches if you ever want to change a number of global constructs to ephemeral ones.

The other main use is memory leak tracking. If your application is supposed to delete everything before quitting, then anything remaining right before quitting is necessarily a leak, QED. With full memory freeing, there is no possible confusion between a leak and global memory.

- Sohta
Quote this message in a reply
Post Reply 


Messages In This Thread
Why free memory on application quit? - Josh - Nov 24, 2008, 09:52 AM
Why free memory on application quit? - sohta - Nov 24, 2008 10:52 AM
Why free memory on application quit? - sohta - Nov 24, 2008, 11:11 AM
Why free memory on application quit? - sohta - Nov 24, 2008, 11:39 AM
Why free memory on application quit? - sohta - Nov 24, 2008, 02:58 PM
Why free memory on application quit? - sohta - Nov 24, 2008, 04:13 PM
Why free memory on application quit? - macnib - Nov 24, 2008, 05:12 PM
Why free memory on application quit? - Fenris - Nov 25, 2008, 04:16 AM
Why free memory on application quit? - DoG - Nov 25, 2008, 05:38 AM
Why free memory on application quit? - mattz - Nov 25, 2008, 08:56 PM
Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  My game crashes on quit... hangt5 17 7,767 Jan 30, 2005 09:38 PM
Last Post: hangt5
  Carbon Apple quit Event troubles deekpyro 3 5,000 May 7, 2002 06:24 AM
Last Post: deekpyro