Around emacs, linux, etc.
[设计模式]Singleton
Singleton通过static关键字和protected的构造函数来确保实例的唯一性。用Static来修饰存储实例的指针,用Static来修饰访问实例的函数,用protected来修饰构造函数。
| Print article | This entry was posted by Jay Xie on 2006/01/07 at 12:38 am, and is filed under 笔记. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
搜狐微博
新浪微博