Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 02-09-2010, 01:36 PM   #3 (permalink)
dda
Registered Member
 
Join Date: Nov 2009
Posts: 42
Default

Quote:
Originally Posted by mebarron View Post
I have a memory management question about sample iPhone app code from Apple, namely:
--------
CoreDataBooks:RootViewController.m

line 255 : // Release the adding managed object context.
line 256 : self.addingManagedObjectContext = nil;
--------

at line #256 the retainCount for addingManagedObjectContext == 1

shouldn't line #256 be the following:

[[self addingManagedObjectContext] release];

Otherwise there is a memory leak, Right?
No. addingManagedObjectContext is an instance variable that is released in the dealloc method of the class it's part of.

Regards,

DDA
dda is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,870
Threads: 89,225
Posts: 380,694
Top Poster: BrianSlick (7,129)
Welcome to our newest member, triclopus
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 06:43 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.