Bad practice to return unique_ptr for raw pointer like ownership semantics?
Returning a std::unique_ptr from a factory method is just fine and should be a recommended practice. The message it conveys is (IMO): You are now the sole owner of this object. Furthermore, for your convenience, the object knows how to destroy itself. I think this is much better then returning a raw pointer (where the … Read more