の解放についての問い合わせは、私はメモリ管理に関する一般的なクエリを持って客観C:インスタンスプロパティ
//In .h file I defined a property
@interface AClass
{
someClass *aProperty;
}
@property (nonatomic, retain) someClass *aProperty;
end
//In .m file I synthesized the property and also initialized the property
@implementation AClass
-(void)aMethod
{
self.aProperty = [[someClass alloc]init];
}
私の質問は、私は「リリース」のメモリを防ぐために行うのですか「aProperty」のために
ですリーク?私は通常、インスタンスのプロパティ(ドット記法を使用)について理解しています。私たちは 'dealloc'と 'viewdidunload'メソッドでリリースします。しかし、このインスタンスでは、aMethodメソッド内でaPropertyを再度リリースする必要がありますか?