Factory functions should return unique pointers
Issue #879
new
It is natural that all factory functions (linear algebra factories, mesh generation factories, etc.) return std::unique_ptr
. That can be converted to std::shared_ptr
if needed then.
This might not have any noticeable performance improvements but it improves semantics of the interface. The question is how SWIG likes this change.
This would be simpler when moving to C++14 so we can use
std::make_unqiue
.pybind11 (which will replace SWIG) supports
unique_ptr
.