본문 바로가기

Code Habit

검색하기
Code Habit
프로필사진 코드베어

  • 분류 전체보기 (203)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2025/08   »
일 월 화 수 목 금 토
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 29 30
31
Tags
  • File
  • 책
  • FOR
  • go
  • write
  • go언어
  • Golang
  • Linux
  • Close
  • channel
  • window
  • json
  • windows
  • Sync
  • range
  • 영화
  • package
  • bitcoin
  • C
  • c++
  • 리뷰
  • Python
  • JavaScript
  • GO 언어
  • tcp
  • install
  • mutex
  • API
  • Callback
  • http
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록Singleton (1)

Code Habit

Singleton pattern

싱글턴 패턴은 소프트웨어 디자인 패턴 중 하나로 프로그램 내에 인스턴스가 오직 하나만 존재하도록 보장하는 패턴이다. 이 패턴은 전역 변수를 사용하지 않고 객체의 단일 인스턴스에 대한 전역적인 접근을 제공한다. - example #ifndef _SINGLE_TON_TMPL_ #define _SINGLE_TON_TMPL_ #include template class Singleton_tmpl : public T { public: Singleton_tmpl() {} ~Singleton_tmpl() {} static Singleton_tmpl *GetInstance() { if (Singleton_tmpl::m_pInstance == nullptr) { Singleton_tmpl::m_pInstance = new..

카테고리 없음 2024. 2. 12. 13:14
이전 Prev 1 Next 다음

Blog is powered by kakao / Designed by Tistory

티스토리툴바