mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-26 13:55:40 +08:00
Don't release object we are not responsible for in callback. Causing mysterious and heinous crashes.
This commit is contained in:
@@ -183,8 +183,9 @@
|
||||
}
|
||||
|
||||
- (void)modelsDidLoad:(NSArray*)models {
|
||||
[models retain];
|
||||
[_objects release];
|
||||
_objects = [models retain];
|
||||
_objects = models;
|
||||
_loaded = YES;
|
||||
|
||||
// NOTE: You must finish load after clearing the loadingRequest and setting the loaded flag
|
||||
@@ -206,7 +207,6 @@
|
||||
[modelsArray addObject:object];
|
||||
}
|
||||
}
|
||||
[models release];
|
||||
|
||||
[self modelsDidLoad:[NSArray arrayWithArray:modelsArray]];
|
||||
[modelsArray release];
|
||||
|
||||
Reference in New Issue
Block a user