"Philippe A. Bouchard" wrote: [...] > Now, it's been a while I did not worked on any locking mechanism but if I am > accessing one counter and the increment instruction is atomic, why would I > need to lock anything?
You'll need the locking protocol/>>memory synchronization<< to ensure visibility of mutations [unless the managed object happens to be immutable] for its proper ``cleanup.'' The main problem is that the count's decrements should not "overtake" memory transaction(s) resulted from object updates/mutation. http://groups.google.com/groups?selm=3DDD0AD2.6760E7F9%40web.de (Subject: Re: std::string, reference counting...) http://groups.google.com/groups?selm=3DEDDFD7.25D14860%40web.de (Subject: Re: Portable Memory Barriers...) regards, alexander. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost