by pcwalton · 12y ago · 0 comments
Those aren't safe. There are many ways to cause use-after-free with unique_ptr: for example, placing a uniquely-owned object in a vector and clearing the vector in a method call on that object.
In the mean time, we can take advantage of modern C++ safe constructs instead of keep on using C, as new language adoption always takes time.
(Yes you can work around the current GC's but this drives away some developers)