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, 02:30 PM   #4 (permalink)
mebarron
Registered Member
 
mebarron's Avatar
 
Join Date: Apr 2009
Location: Michigan
Posts: 47
Default

Quote:
Originally Posted by dda View Post
No. addingManagedObjectContext is an instance variable that is released in the dealloc method of the class it's part of.

Regards,

DDA
Thanks so much for your reply.
Please help me out here. As I see it

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

just prior to execution of line 255 and just after it too,
the retainCount == 1 on the object pointed to by addManagedObjectContext.

The command in the method dealloc would be:

[addingManagedObjectContext release];

This would result in the decrementation of the retainCount from 1 to zero
for the object pointed to by the variable:

addingManagedObjectContext .

Problem is, this variable/pointer has been set to nil
and the object that it used to point to is still sitting
in memory with a retainCount == 1 . Or ?

Furthermore, I don't see, any check for

if(addingManagedObjectContext == nil)

in the code, to use it as a flag. Please let me
know if I am missing something.
mebarron is offline   Reply With Quote
 

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

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