Subj : Re: Can C++ local static objects be made thread safe? To : comp.programming.threads From : David Schwartz Date : Thu Feb 10 2005 06:06 pm "SenderX" wrote in message news:3_2dnY17kMWTjZHfRVn-oQ@comcast.com... >> // Change this with your favorite static initializer method. >> Item &cofu() { >> static Item *the_item = 0; >> if ( the_item == 0 ) { >> the_item = new Item(); // compiler lock here. >> } >> return the_item; >> } > > Your missing some memory barriers... Read the comment you quoted but didn't process. DS .