Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

bahlquist

macrumors member
Original poster
Oct 6, 2010
41
0
If you fail to release memory in a program, what is the worst that can happen? Is it just the case that you must shutdown the computer to release the memory, or can you have more significant problems?
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
Nothing of that severity at all. When your program exits, the memory is returned to the system. Worst case users have to restart your program as it gets bloaty, and they get sick of doing so, and stop using your program. You're not going to do anything to hardware, etc.

-Lee

EDIT: I guess if you leak badly enough that the system exhausts RAM and swap then the OS will no longer be able to grant requests for memory, and the system will start behaving oddly. This is the most extreme case, but it happens.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.