News for hackers. Stuff that matters.
Re:Starting a tech startup with C++ by pcwalton on Saturday January 02, 2016 @06:05PM (#10828456)
> There is a small computational cost to maintaining referenced pointers but it’s minuscule and the safety outweighs this cost.

Atomic reference counting does not have minuscule costs. See, for example, http://www.hboehm.info/gc/nonmoving/html/slide_11.html

In particular, note that if you use shared_ptr everywhere you will be end up with much slower code than you would have if you had a good GC. In other words, you end up slower than Java, with less safety and more verbosity.

Browser engines have used custom non-thread-safe reference counted pointers where possible extensively for this reason.

Furthermore, I always have to say it: shared_ptr is not memory safe.

There are no comments on this comment yet.