CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: ninja9578

Search: Search took 0.16 seconds.

  1. Replies
    12
    Views
    8,271

    Re: Singleton Method

    Actually, now that I think about it. LLVM has an option for thread-safe statics too, even without C++11.
  2. Replies
    12
    Views
    8,271

    Re: Singleton Method

    Oops, I missed a static.

    In multithreaded environments, it is most common (that I've seen) to call all of the singleton methods in main() before any threads get launched.
  3. Replies
    12
    Views
    8,271

    Re: Singleton Method

    That's not a good idea. Singletons should clean themselves up, if you create your singleton on the heap, then you are supposed to delete it.


    static Sample & Instance(){
    Sample singleton;...
Results 1 to 3 of 3





Click Here to Expand Forum to Full Width

Featured