Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
일기장 [STEP 2] Mary, Whales #134
base: ic_9_whale
Are you sure you want to change the base?
일기장 [STEP 2] Mary, Whales #134
Changes from all commits
fecc10b
971a07b
03b05c1
eee7407
a200cfa
5248c7b
5f79326
ef67611
fbc2d86
a180043
1fb5d7d
0dcaad6
1c89149
45db402
936d211
a45087f
1ec8d4a
7eb44ef
95dd5d9
8928097
d838492
cfecbc7
c9e4490
dfc8a85
a3fae63
3883a95
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
escaping하는 closure에서 self를 잡을 때 메모리가 어떻게 되는지, 어떤 점을 주의해야하고 사용해야하는지 설명해주세요~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
기본적으로 클로저 내부에서 self를 사용하는 경우 클로저는 self에 대한 강한 참조를 유지합니다. 그리고 만약 클로저 내부에서 self의 프로퍼티에 저장하는 것과 같이 self가 클로저에 대한 강한 참조를 유지하는 경우, self와 클로저 간 순환 참조가 발생하게 됩니다.
순환 참조가 발생하게되면 각 인스턴스가 할당 해제되는 것을 방지하여 앱에서 메모리 누수를 유발하기 때문에 주의하고 사용해야합니다.