Skip to content
UPEEC

shared_ptr

Shared ownership with reference counting; the object dies when the last owner goes.

Intermediate
Comments 0

auto cfg = std::make_shared<Config>(); — costs an atomic count; don't use it by default.

Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.

Discussion (0)

Sign in or join free to ask questions and discuss this topic.