【发布时间】:2011-01-16 09:13:27
【问题描述】:
给定以下代码
@interface MyClass
{
SomeObject* o;
}
@property (nonatomic, retain) SomeObject* o;
@implementation MyClass
@synthesize o;
- (id)initWithSomeObject:(SomeObject*)s
{
if (self = [super init])
{
o = [s retain]; // WHAT DOES THIS DO? Double retain??
}
return self
}
@end
【问题讨论】:
标签: iphone objective-c memory-management retain