std::shared_ptr handling