title: Static local variable in C++11?
body: <p>What is the difference between:</p>
  
  <pre><code>class A {
   public:
     static const A&amp; GetInstance() {
       static A a;
       return a;
     }
  };
  </code></pre>
  
  <p>and</p>
  
  <pre><code>class B {
    public:
     static const B* GetInstance() {
       static B* b = new B;
       return b;
     }
  };
  </code></pre>
  
  <p>? Is there a difference in the lifetime of the Singleton between A and B? the memory location of the object? any differences generally?</p>