Reputation: 9064
I've got the following warning: "Assigning retained object to unsafe property; object will be released after assignment" for the following snippet of code. Could somebody please help me clear this up? The second line where I set detailViewController.restaurantsSortedByDistance is the portion highlighted by the warning.....
** RestaurantList.h **
@property (nonatomic) NSMutableArray *restaurantsSortedByDistance;
** end **
RestaurantList *detailViewController = [[RestaurantList alloc] initWithNibName:@"RestaurantList" bundle:nil];
detailViewController.restaurantsSortedByDistance = [[NSMutableArray alloc] initWithArray:[self returnRestaurantsSortedByDistance:rows]];
Upvotes: 0
Views: 172
Reputation: 13459
On your detailViewController.h set your restaurantsSortedByDistance property to strong.
Upvotes: 1