Re: [array release] not happening.
Re: [array release] not happening.
- Subject: Re: [array release] not happening.
- From: Shawn Erickson <email@hidden>
- Date: Fri, 12 Jul 2002 08:58:12 -0700
Don't follow the surrounding logic but I assume it makes sense in the
full method...
How do you know it is not released?
If it isn't being released then something else has a reference to it or
it may have a pending autorelease. You can ask allMounted its current
reference count ([allMounted retainCount] ) to get an idea or use the
debugger.
-Shawn
On Friday, July 12, 2002, at 08:19 AM, Gjermund Gusland Thorsen wrote:
Why doesn't this:
i = [ allMounted count ];
// fprintf( stderr, "allMounted: %i\n", i);
if( i != 1 ){
[ allMounted removeObjectAtIndex:0 ];
mpEnum = [allMounted objectEnumerator];
} else {
[ allMounted release ];
}
release when i == 1 ??? I also tried:
// fprintf( stderr, "allMounted: %i\n", [ allMounted count ]);
if( [ allMounted count ] == 1 ){
[ allMounted release ];
} else {
[ allMounted removeObjectAtIndex:0 ];
mpEnum = [allMounted objectEnumerator];
}
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.