「viewDidUnload」でオブジェクトを削除する以下のAppleの推奨事項(Core Dataチュートリアルにあります)に関してもう少し情報を提供できる人に興味があります。例えば:
- なぜこれが重要なのですか?nil'ingをリリースすることとは異なりますか?
- これはベストプラクティスですか/私はこれを行っていませんし、これを見ていません。私が見たiPhoneのサンプルコードでは考えていませんか?
コード:
// The implementation of viewDidUnload should relinquish ownership
// of anything created in viewDidLoad that can be recreated.
- (void)viewDidUnload {
self.eventsArray = nil;
self.locationManager = nil;
self.addButton = nil;
}
- (void)dealloc {
[managedObjectContext release];
[eventsArray release];
[locationManager release];
[addButton release];
[super dealloc];
}