#2 is also not thread-safe in C++03. It is in C++0x
In #2, storage space is pre-allocated for Car, but the constructor is only called at the first call to getInstance().
gg
| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
|
Results 1 to 6 of 6
Threaded View
Tags for this Thread |
Click Here to Expand Forum to Full Width |