기능추가 : 롱클릭 링크 공유, 좋아요(즐겨찾기)#22
Open
Onedelay wants to merge 4 commits into
Open
Conversation
ch-Yoon
reviewed
Jan 20, 2019
| } | ||
| } | ||
| } | ||
| return instance; |
There was a problem hiding this comment.
단 한개의 Instance만 생성되는 것을 보장하기 위해 getInstance 함수가 thread safe하도록 구현된 것으로 확인됩니다.
getInstance 함수 앞에 단순히 synchronized를 붙이는 방법이 존재하지만, 해당 방법은
Multi Thread 환경에서 성능 이슈가 발생될 수 있는 방법입니다.
그렇기에, 현재 코드에서는 성능 이슈가 발생되는 것을 고려하여
DCL(Double Checking Locking) 방법을 사용한 것으로 확인됩니다. 👍
다만, private static AppDatabase instance; 코드에서 volatile 키워드가 누락되어 있으니, 확인 부탁드립니다.
yslee94
reviewed
Jan 20, 2019
| void setAdapterView(AdapterContract.View adapterView); | ||
| void setAdapterModel(AdapterContract.Model<FavoriteEntity> adapterModel); | ||
| } | ||
| } |
There was a problem hiding this comment.
저도 이러한 제한때문에 불필요한 코드가 많이 들어간다고 느꼈습니다.
최소한의 규칙을 유지하면서 유연한 구조를 가지려면 고민이 많이 필요할 것 같습니다..
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
개요
작업사항
title과director