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

Overview Shared vs Unique vs Weak Pointers

Stryg for at vise menuen

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?

Vælg det korrekte svar

question mark

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

Vælg det korrekte svar

question mark

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

Vælg det korrekte svar

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 5. Kapitel 3

Spørg AI

expand

Spørg AI

ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

Overview Shared vs Unique vs Weak Pointers

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 5. Kapitel 3
some-alt