Skip to content

ARC란 무엇인지 설명하시오. #21

Open

Description

@Glsme

Auto Reference Counting

  • 메모리 구조 중 Heap영역에서 메모리를 관리할 때 사용된다.
  • Heap영역에서 강한 참조에 의하여 Memory Leak이 발생할 수 있다. 이를 방지하기 위해 weak, unowned 키워드를 사용하여 Memory Leak을 예방할 수 있다.



weak & unowned

가르키는 인스턴스의 RC의 숫자를 올라가지 않게 하는 키워드

weak unowned
소유자보다 짧은 생명주기를 가진 
인스턴스를 참조할때 주로 사용
 소유자 보다 인스턴스의 생명주기가 더 길거나,
 같은 경우에 사용


Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions