This question already has answers here: Closed 10 years ago. Possible Duplicates: pimpl: shared_ptr or unique_ptr smart pointers (boost) explained Could someone explain differences between shared_ptr and unique_ptr? 4...
  • May 16, 2022
  • 0 Comments
I started studying smart pointers of C++11 and I don’t see any useful use of std::weak_ptr. Can someone tell me when std::weak_ptr is useful/necessary? 15 Answers 15
  • May 15, 2022
  • 0 Comments
std::shared_ptr<Object> p1 = std::make_shared<Object>("foo"); std::shared_ptr<Object> p2(new Object("foo")); Many google and stackoverflow posts are there on this, but I am not able to understand why make_shared is more efficient than...
  • May 12, 2022
  • 0 Comments
I have a solid understanding of most OOP theory but the one thing that confuses me a lot is virtual destructors. I thought that the destructor always gets called...
  • April 11, 2022
  • 0 Comments