proper memory handling for an NSMutableArray assigned to property?
问题 I have a property declared like this: @property (nonatomic, retain) NSMutableArray *pricingLevels; And I assign it like this: self.pricingLevels = [[[NSMutableArray alloc] init]; in my dealloc I have this: self.pricinglevels=nil; When I analyze my code with xCode it says I have a memory leak here: self.pricingLevels = [[[NSMutableArray alloc] init]; Should I be using an autolrelease on this because the self.pricinglevels holds a reference to the array also? 回答1: self.pricingLevels is a