You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
__strong : 만들어진 아이를 강하게 가지고 있다가 함수의 지역성에 의해서 if문 끝나고 stack pop 되면 메모리 삭제
ex) __strong UIImage *temp = [[UIImage alloc] init]; life cycle 관여를 합니다 강하게 참여하여 함수의 지역성에 의해서 if문 끝나고 stack pop 되면 메모리 삭제
__weak : weak 단순참조 객체가 필요해서 포인터를 객체를 가저오는경우 주소는 있는데 내가 원하는객체가 없으면 댕글링 포인터(포인터가 여전히 해제된 메모리 영역을 가리키고 있다면, 이러한 포인터를 댕글링 포인터(Dangling Pointer)라고 한다)가 발생 하지만 Zero weak 발생하여 댕글링 포인터 해결 즉 if문이 끝나면 stack pop 대상지의 주소가 없으므로 NULL처리
__unsafe_unretained : Zero weak 발생하지 않는다. if문이 끝나도 메모리는 살아있음
__weak 사용한 경우 return 후에 메모리가 자동적으로 nill을 가지는 것을 확인할수있다.
__unsafe_unretained 사용한 경우 return 후에 메모리가 자동적으로 nill을 가지지 않는다.
ios study 2day (Light the candle) MVC patternator
MVC patternator 정의부분
__strong & __weak in ARC
생성자 초기화 방법
setter, getter access method 정의부분
setter, getter access method 구현부분
자료출저
The text was updated successfully, but these errors were encountered: