Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- Python
- Sync
- write
- window
- json
- 책
- range
- windows
- mutex
- 리뷰
- Linux
- JavaScript
- C
- 영화
- package
- Callback
- http
- channel
- bitcoin
- tcp
- c++
- FOR
- File
- Golang
- Close
- GO 언어
- install
- go언어
- go
- API
Archives
- Today
- Total
목록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