Welcome, Guest. Please login or register.
Did you miss your activation email?
May 25, 2017, 01:31:25 AM
Home Help Search chat Login Register 
News: Read this please.The Great Kangaroo Escape Looking for reviews of the 4th ed on Amazon!   Twitter:  @skochan

+ Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
|-+ Old Stuff
| |-+ Chapter Study
| | |-+ Chapter 16 - Working with Files
| | | |-+ Program 16.1
Pages: [1] Go Down
Author Topic: Program 16.1 (Read 1397 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:

Login with username, password and session length

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 (c) 2009 classroomM.com. All rights reserved.