So, I have class:

@interface Controller : NSObject
{
    UILabel* fileDescription;
}

@property(strong, nonatomic) UILabel* fileDescription;

Do I need use method dealloc where property fileDescription will equal nil?
For example:

-(void)dealloc
{
    fileDescription = nil;
}

If not, who will dismiss memory used by fileDescription?

推荐答案

Generally you don't need to provide a subclassed dealloc method as ARC manages the lifetime of the instance variables.

However it can be useful to perform clean-up other than releasing objects, for example to remove an observer or close a network connection down cleanly. You are therefore allowed to subclass dealloc under ARC, but you are not allowed to call [super dealloc] from within the subclassed method.

In your particular case it's not required, however.

Objective-c相关问答推荐

如何使用 UIStepper

如何声明仅调试语句

Xcode 中架构的重复符号

在 Objective-C 中定义协议的类别?

performSelector 的返回值:

iPhone:推送通知后如何删除徽章?

为什么 UICollectionView 的 UICollectionViewCell 没有在用户时突出显示?

UIGestureRecognizer 是否适用于 UIWebView?

只有 ONE VIEW 横向模式

setStatusBarHidden 在 iOS 9.0 中已弃用

检测设备是否支持电话?

OSStatus 错误代码 -34018

如何四舍五入浮点值?

Core Text在iOS中计算字母框架

如何为 iPhone 应用程序创建多个主题/皮肤?

获取当前调度队列?

如何判断数组是空还是空?

笔尖中的原型单元而不是故事板

Objective-c - CABasicAnimation 在动画后应用更改?

在 Xcode 中制作 RGB colored颜色