해제에 대한 쿼리 나 메모리 관리에 대한 일반적인 쿼리를목적 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를 다시 릴리스해야합니까?