D on quora ...

Ola Fosheim Grøstad ola.fosheim.grostad+dlang at gmail.com
Mon Oct 16 16:11:05 UTC 2017


On Monday, 16 October 2017 at 14:24:57 UTC, Paulo Pinto wrote:
> On Monday, 16 October 2017 at 14:14:50 UTC, Ola Fosheim Grøstad 
> wrote:
>> On Monday, 16 October 2017 at 13:49:50 UTC, Atila Neves wrote:
>>> A std::shared_ptr going out of scope can pause the program 
>>> for just as long as a GC mark-and-sweep.
>>
>> I don't use shared_ptr much, but why would a single shared_ptr 
>> be that slow?
>
> Cascade deletion of nested data structures, with the 
> possibility of causing stack overflow.

Cascaded deletion? That's far more than a shared_ptr… Nobody does 
that in real code, unless they are prototyping.



More information about the Digitalmars-d mailing list