exactly,  current code using bare pointer -- not safe   in the case your code needs to share pointer , -- for safety use shared_ptr  in the case your code needs single copy for pointer, -- for safety use uniq_ptr  using uniq_ptr.get() is no longer safe from that point. its safe from leakage.  