QuoteOriginally posted by: outrunQuoteOriginally posted by: CuchulainnQuoteOriginally posted by: outrunover-insured can extra-hide bugs IMO. Instead of things crashing 100% of the time, it crashed 1% of the time.I agree.Like a HW calibrator that works for all vol except vol = 66.6%. It looks like a s/w error, but it is a model error. Putting smart ptr left, right and centre is not good IMO. SPs are not thread-safe. Probably means the code cannot be parallelized so easily.Good point about threads, I didn't realize that (but I've never used shared_ptr, I like accounting :d )Polter and myself on Concurrency thread had some remarks on making them thread-safe. I suppose the reference counter makes it non thread-safe. COM has exactly the same issues with AddRef(), Release() of reference count an you have to lock the count variable. I am not a compiler builder but I reckon something similar in C++11 is too late now and not desirable (locks). If you meet me in a dark lane on a Saturday night to choose between smart and raw, I would choose the latter, for parallel stuff. But boost scoped_ptr is exception safe.atomic operations in COM
Last edited by Cuchulainn
on August 21st, 2015, 10:00 pm, edited 1 time in total.