Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lära Overview Shared vs Unique vs Weak Pointers | Advanced topics
C++ Smart Pointers
course content

Kursinnehåll

C++ Smart Pointers

C++ Smart Pointers

1. Introduction to Smart Pointers
2. Unique Pointers
3. Shared Pointers
4. Weak Pointers
5. Advanced topics

book
Overview Shared vs Unique vs Weak Pointers

1. What happens when multiple std::shared_ptr instances share ownership of the same object, and all of them go out of scope?

2. Which of the following is true about std::unique_ptr?

3. Why would you use a std::weak_ptr instead of a std::shared_ptr?

question mark

What happens when multiple std::shared_ptr instances share ownership of the same object, and all of them go out of scope?

Select the correct answer

question mark

Which of the following is true about std::unique_ptr?

Select the correct answer

question mark

Why would you use a std::weak_ptr instead of a std::shared_ptr?

Select the correct answer

Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 5. Kapitel 3
Vi beklagar att något gick fel. Vad hände?
some-alt