Click here to Skip to main content
15,884,176 members
Articles / Programming Languages / C++

Singleton Pattern: Single Instance, but Multiple Implementations

Rate me:
Please Sign up or sign in to vote.
4.83/5 (10 votes)
27 Sep 2012CPOL5 min read 35.9K   286   23  
A template based, thread safe singleton implementation in C++
In this article, I provide a template class that will be useful as it takes away the need for thread synchronization and reference counting.

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

No alternatives have been posted.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
India India
A senior engineer who likes reading and coding Smile | :) . I can be reached at sudheeshps@gmail.com

Comments and Discussions