Is it necessary to do a reset() on a std::unique_ptr in destructor?

Not really a JUCE question, but my understanding is that a std::unique_ptr will safely delete its underlying raw pointer once it goes out of scope, so is it necessary to call reset() on it in the destructor?

I see this in a lot of places in the JUCE source.

nop.
or only if you need a specific deletion order

3 Likes