ThinkGeek - Cool Stuff for Geeks and Technophiles

November 23, 2005

[Cocoa] Memory management and exceptions

In languages like Java and actionscript, the "runtime" manages memory, using what is called a garbage collector, that reclaims the memory occupied by an object once it determines that object is no longer accessible. In Objective-C, the programmer must release the resources that he or she has previously allocated to be used by the program.

Memory management is not difficult by itself, because the developer must follow only a few rules, but it is the source of many memory leaks, specially when the program behaves in an unexpected way.

So, what happens when we need to throw exceptions?. How can we be sure that we are not producing memory leaks?. Chris Hanson writes about it in Cocoa memory management & exceptions

Posted by Cesar Tardaguila Date: November 23, 2005 04:55 PM | TrackBack
Comments
Post you comment









¿Remember me?




Thanks to spammers, comment moderation is enabled, so your comments will not be posted until approved.