Hello,
Check the
"C++ and the Perils of Double-Checked Locking"[
^] article by Scott Meyers and Andrei Alexandrescu to find why the sample code you've got fails.
The article does provide a sample of thread-safe singleton. Yes, it does suffer from performance issue you are trying to solve with double checking. But it is thread safe. As for the performance, you need to have an idea of how often you are going to call the GetInstance() method before trying to find solution for it.