我得到這個警告後放行自動引用計數問題:將保留對象分配給unsafe_unretained變量;對象將分配
「自動引用計數的問題:分配保留對象unsafe_unretained變量;對象將分配後發佈」
下面是代碼
.H
@interface myObject : NSObject
{
}
@property (assign) id progressEnergy;
@end
.M
@implementation myObject
@synthesize progressEnergy;
-(id)init
{
if ((self = [super init]))
{
progressEnergy = [[progress alloc] init]; //warning appear on this line
}
return self;
}
@end
我已經嘗試
@property (assign) progress* progressEnergy;
,但沒有運氣
能否請你幫我弄清楚什麼是錯的?
謝謝。這是問題:) – zeroonnet 2012-03-06 20:32:25