#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 |
Search:Type: Posts; User: Codeplug Search: Search took 0.20 seconds.
Results 1 to 1 of 1
|
Click Here to Expand Forum to Full Width |