C++ Logo

std-proposals

Advanced search

Re: [std-proposals] std::shared_ptr resurrect

From: Jason McKesson <jmckesson_at_[hidden]>
Date: Tue, 12 Dec 2023 09:23:00 -0500
On Tue, Dec 12, 2023 at 6:56 AM Valentin Palade via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
> The main requirements behind resurrect are:
>
> lock free
> preserving the control block that was allocated initially for the object.
>
> Because of the second idea, we cannot efficiently move away from the old pointer as we'll need to reallocate the control block.

Moving from a shared_ptr doesn't cause any reallocation.

Received on 2023-12-12 14:23:10