Why do smart pointers null out the wrapped pointer before destroying it?--Raymond Chen
Ever thought about it?
Why do smart pointers null out the wrapped pointer before destroying it?
by Raymond Chen
From the article:
When you null out a smart pointer type, the smart pointer type nulls out the old pointer before releasing it, rather than releasing the member and then setting it to null. Why does the old value get detached from the smart pointer before releasing it? Why not release it, and then set it to null?

Registration is now open for CppCon 2021, which starts on October 24 and will be held 
Will you participate?
Registration is now open for CppCon 2021, which starts on October 24 and will be held
Registration is now open for CppCon 2021, which starts on October 24 and will be held