82. Smart Pointers-I

Question.1

A developer uses unique_ptr to manage a sensor driver:

void read_sensor() {
   auto s = std::make_unique<Sensor>(5);
   s->read();
} // s goes out of scope

What happens when the function returns?

Need Help? Refer to the Quick Guide below

Select Answer