Re: SIGBUS/SIGSEGV error problems
Re: SIGBUS/SIGSEGV error problems
- Subject: Re: SIGBUS/SIGSEGV error problems
- From: Koen van der Drift <email@hidden>
- Date: Mon, 11 Aug 2003 21:45:09 -0400
On Monday, August 11, 2003, at 09:18 PM, Mike Brinkman wrote:
for (i = 0; i < [myArray count]; i++)
{
myObject = [[XObject alloc] init];
myObject = [myArray objectAtIndex:i];
// increment sum with floatValue of current object's amount
sum += [[myObject amount] floatValue];
// release myObject
[myObject release];
}
I don't think you need to init/release myObject in this case. The line
myObject = [myArray objectAtIndex:i]; will return a pointer to the
object in the array and you can use that to get the float.
- Koen.
_______________________________________________
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.