Home > Articles

This chapter is from the book

Summary

In summary:

  • Avoid singletons: the pattern, not the single-instance abstraction.

  • Prefer a namespace to a class to model this type of abstraction.

  • Use static data carefully when implementing a singleton.

  • Understand the motivations for the Core Guidelines.

  • Review the Core Guidelines as the C++ language grows and evolves.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.