注意:我没有使用 ARC
我有一个具有以下属性的 UILabel:@property (nonatomic, retain) UILabel *someLabel;我正在尝试设置自定义设置器。下面的代码是否会导致泄漏,因为@property实际上retain也在调用?
- (void)setSomeLabel:(UILabel *)someLabel
{
if (someLabel != self.someLabel) {
[self.someLabel release];
self.someLabel = [someLabel retain];
}
// some custom code here
}