As an example code I've given here, I have the feeling the use of std::shared_ptr
is wrong and should be replaced using a std::unique_ptr
because there's no real shared ownership semantics, besides of temporary needs.
As an example code I've given here, I have the feeling the use of std::shared_ptr
is wrong and should be replaced using a std::unique_ptr
because there's no real shared ownership semantics, besides of temporary needs.
How could that code be writtenrefactored correctly, e.g. using std::unique_ptr
instead?
How could that code be written correctly using std::unique_ptr
instead?
How could that code be refactored correctly, e.g. using std::unique_ptr
instead?