83. Smart Pointers-II

Question.1

A developer extracts the raw pointer and deletes it manually:

auto s = std::make_unique<Sensor>(5);
Sensor* raw = s.get();
delete raw;  // Manual delete
// s goes out of scope later...

What happens when s goes out of scope?

Need Help? Refer to the Quick Guide below

Select Answer