Disposing NSArray
Disposing NSArray
- Subject: Disposing NSArray
- From: Youngjin Kim <email@hidden>
- Date: Fri, 1 Jun 2001 08:03:25 +0900
What's the differerence between two?
Both array1 and array2 are locally instantiated in a method.
-(void) doSomething {
NSArray* array1;
NSArray* array2;
array1 = [[NSArray arrayWithObjects:s1,s2,s3,s4,nil] autorelease];
array2 = [[[NSArray alloc] initWithObjects:s1,s2,s3,s4,nil]
autorelease];
...
}
I'm getting signal raised with array1. but array2 work fine.
Youngjin