Is this shared_ptr usage okay?