Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
June 23, 2018, 11:42:59 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
   Home   Help Search Login Register Chat  
Pages: [1]   Go Down
Author Topic: Program 16.1  (Read 1519 times)
Posts: 7

« on: May 27, 2010, 06:54:39 AM »

Apologies in advance for newbishness...

When returning for an error condition {("file does not exist"); return 1;} we do not drain the autopool.  Is this for a calling program to query the objects that may have caused the error or is it done for another reason?

Hero Member
Posts: 3114

« Reply #1 on: May 27, 2010, 09:18:33 AM »

Technically speaking, the autorelease pool should be drained before any of the return statements in any of the examples in the chapter are executed.  That was an oversight. 

In reality, the application is terminating, so all memory gets released anyway.  However, to be consistent, the pool should be drained.


Steve Kochan
Pages: [1]   Go Up
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents ゥ 2009 All rights reserved.