COB-99: Replace custom SmartPtr implementation (and boost::shared_ptr) with std::shared_ptr and std::unique_ptr
Use C++11 std::shared_ptr
and std::unique_ptr
instead of the custom SmartPtr
(everywhere throughout RTCP) or boost::shared_ptr
(gpu_wrapper.h
).
In some instances, it was not completely obvious whether the pointer should be unique
or shared
, especially with Pool
or Queue
objects where strict ownership of the objects pointed to may be desirable. Furthermore, the custom Pool
and Queue
objects make it hard to properly use the unique_ptr
in combination with std::move
anyway. With the objective of removing SmartPtr
in mind (rather than an even more extensive refactor operation), the following strategy was applied: use shared_ptr
wherever unique_ptr
causes problems but try use unique_ptr
as much as possible.