본문 바로가기 메뉴 바로가기

유부중년 개발자의 우울

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

유부중년 개발자의 우울

검색하기 폼
  • 분류 전체보기 (456)
    • life (223)
      • movie (50)
      • animation (4)
      • music (40)
      • book (20)
      • game (3)
    • hacking (232)
      • nodejs (3)
      • web (88)
      • linux&gnome (58)
      • java (40)
    • misc (1)
  • 방명록

singleton (1)
singleton과 lazy loading...

싱글톤 패턴의 전형적인 자바 구현: public class Singleton { static Singleton instance; public static synchronized Singleton getInstance() { if (instance == null) { instance == new Singleton(); } return instance; } } 위의 구현의 문제점은 getInstance가 synchronized는 것이다. 그래서 좀 지저분하지만 현실적인 해결책으로: public static Singleton getInstance() { if (instance == null) { synchronized (Singleton.class) { if (instance == null) { instanc..

hacking/java 2007. 1. 28. 16:54
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
  • github
  • twitter
  • facebook
  • ask.fm
TAG
  • ***1/2
  • Prototype
  • 자전거
  • Dojo
  • Java
  • Ajax
  • 땅끝마을
  • jQuery
  • 여행
  • 책
  • web
  • ****
  • webapp
  • DeveloperWorks
  • HTML5
  • nodejs
  • 독후감
  • 해남
  • 장필순
  • Eclipse
  • maven
  • 영화
  • CSS
  • JavaScript
  • **
  • ***
  • 자바스크립트
  • 노래
  • Google
  • docker
more
«   2026/02   »
일 월 화 수 목 금 토
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바