Smart pointers instead of GC?

Manu turkeyman at gmail.com
Tue Feb 4 01:01:04 PST 2014


On 4 February 2014 17:31, Paulo Pinto <pjmlp at progtools.org> wrote:

> On Tuesday, 4 February 2014 at 02:05:07 UTC, Nick Sabalausky wrote:
>
>> On 2/3/2014 4:13 PM, H. S. Teoh wrote:
>>
>>> I've seen real-life
>>> examples of ARCs gone horribly, horribly wrong, whereas had a GC been
>>> used in the first place things wouldn't have gone down that route.
>>>
>>>
>> I'm curious to hear more about this.
>>
>
> An example is when you have a huge graph and the root reaches it count ==
> 0.
>
> The time taken into a cascading deletes of the whole structure is similar
> to a stop-the-world GC pause.
>

Only if it's not deferred, and even then, if you're freeing a huge
structure like that, it's at a particular time where you planned to do so.
No realtime app I know of goes and free's a huge runtime graph mid-frame at
some random moment. That's just silly.

It's still easy to defer deletion under ARC if that's what you want to
do... it's all about _choice_ :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20140204/13e9f98f/attachment.html>


More information about the Digitalmars-d mailing list