On 4 February 2014 17:31, Paulo Pinto <[email protected]> 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_ :)
