Created
September 21, 2015 04:43
-
-
Save choiseungho/97d39ab550149c3f3741 to your computer and use it in GitHub Desktop.
singleton class에 Serializable 클래스로 만들기
This file contains 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
private Object readResolve() | |
{ | |
//동일한 객체가 반환되도록 하는 동시에, 가짜 객체는 GC가 처리 하도록 함 | |
return INSTANCE; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment