Quick question, after viewDidUnload calls the dealloc call? I ask regarding pickerData, I realized that the variable will be released when dealloc is called. My reason for asking, as I noticed in one book, is that the author sets pickerData to nil in viewDidUnload. Is this a harmless excess, maybe even good practice, or is there no scenario in which it would not be possible to call without another.
INTERFACE:
@interface SingleViewController : UIViewController { NSArray *pickerData; } @property(nonatomic, retain) NSArray *pickerData; @end
IMPLMENTATION:
-(void)viewDidUnload { [self setSinglePicker:nil]; [self setPickerData:nil]; [super viewDidUnload]; } -(void)dealloc { NSLog(@"Here"); [singlePicker release]; [pickerData release]; [super dealloc]; } @end
Gary
, viewDidUnload: , UIViewController. dealloc: , UIViewController . - .
ivars nil, , ivars . viewDidUnload: , , . , , : " , , , . , , viewDidLoad:.
ivars nil , dealloc nil, Objective-C.
Source: https://habr.com/ru/post/1732409/More articles:How to create a number of polygons using a metapost? - layoutКак переопределить имя элемента xml для элементов коллекции с помощью XmlAttributeOverrides? - overrideLink_to_remote with nested routes - ruby-on-railsCompound team wpf prism - commandEclipse CDT - Copy static resource file to bin_dir - eclipsehttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1732410/rails-with-models-a-hasmany-b-belongsto-c-return-a-where-b-belongs-to-c-and-b-is-most-recently-created-for-given-a&usg=ALkJrhjSv3U51bPYP-nbLcoMhcEgLis-cgAccess Violation Exception When Calling a Method - c ++ASP.NET Code Coverage - vb.netSpring Design by Contract: Where to Start? - springObjective-C Окно настроек makeKeyAndOrderFront или showWindow? - objective-cAll Articles