0
任何人都可以闡明爲什麼這種使用mutableCopy會泄漏內存?mutableCopy內存泄漏
- (id)objectInListAtIndex:(unsigned)theIndex {
NSSortDescriptor *descriptor = [[[NSSortDescriptor alloc] initWithKey:@"noteNumber" ascending:YES] autorelease];
[list sortUsingDescriptors:[NSArray arrayWithObjects:descriptor,nil]];
NSMutableArray *theArray = [list mutableCopy];
NSDictionary *theDict = [theArray objectAtIndex:theIndex];
return theDict;
}