One Trick on shared_ptr

I find that shared_ptr can correctly handle the deconstruction of the sub-class without virtual deconstruntor. Therefore, I searched for related references and conducted one trial to verify it.
I do not want to go deep in the source code, so I just introduce them by some examples simply.
What’s more, I think up one optimizing trick after further study.

Continue reading