Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closure, Block 캡쳐링에 대한 실험 #11

Open
cozzin opened this issue Oct 30, 2018 · 2 comments
Open

Closure, Block 캡쳐링에 대한 실험 #11

cozzin opened this issue Oct 30, 2018 · 2 comments
Assignees

Comments

@cozzin
Copy link
Owner

cozzin commented Oct 30, 2018

Nested Block을 사용할 때 순환참조에 대한 이슈가 항상 고민된다.
제대로 된 실험을 통해서 정리해두면 어떨까?

@cozzin cozzin self-assigned this Oct 30, 2018
@cozzin
Copy link
Owner Author

cozzin commented Nov 1, 2018

onmyway133/blog#164

@cozzin cozzin changed the title Nested Block 캡쳐링에 대한 실험 Closure, Block 캡쳐링에 대한 실험 Nov 3, 2018
@cozzin
Copy link
Owner Author

cozzin commented Nov 3, 2018

stored lazy property 생성하는 closure에서 self를 바로 접근해도 retain count 이슈가 없다.

immediately applied closure {}() is considered @NoEscape

noescape로 처리되기 때문이다. [unowned] [weak] 같은 키워드를 붙여서 처리할 필요 없다.
https://stackoverflow.com/a/38144190

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant