Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Objective - c program help (source included)
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="mystic_fm" data-source="post: 773533" data-attributes="member: 28538"><p>When a program terminates, my understanding is that any allocated memory is normally reclaimed by Mac OS X, whether the memory had been released by the program or not. Memory leaks are primarily an issue while a program is still running. However, it's much smarter to take care of releasing memory and other resources in the program in all cases; failing to do so would be a bit like a Navy fighter pilot who doesn't attempt to catch a wire during a carrier landing, instead trusting to some sort of last ditch*, emergency barricade system to stop his plane from going into the water. <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p></p><p>Caveat: I'm not an expert in Mac OS X's internal behavior in this regard. All I've ever needed to know for my own purposes as an application developer is that it is always best to make certain you're releasing anything you've allocated once you don't need it anymore.</p><p></p><p><span style="font-size: 9px">* is this a pun? I'm not quite sure. <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></span></p></blockquote><p></p>
[QUOTE="mystic_fm, post: 773533, member: 28538"] When a program terminates, my understanding is that any allocated memory is normally reclaimed by Mac OS X, whether the memory had been released by the program or not. Memory leaks are primarily an issue while a program is still running. However, it's much smarter to take care of releasing memory and other resources in the program in all cases; failing to do so would be a bit like a Navy fighter pilot who doesn't attempt to catch a wire during a carrier landing, instead trusting to some sort of last ditch*, emergency barricade system to stop his plane from going into the water. :) Caveat: I'm not an expert in Mac OS X's internal behavior in this regard. All I've ever needed to know for my own purposes as an application developer is that it is always best to make certain you're releasing anything you've allocated once you don't need it anymore. [SIZE="1"]* is this a pun? I'm not quite sure. :)[/SIZE] [/QUOTE]
Verification
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Objective - c program help (source included)
Top