Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

When would you want the graph to exist due to some leaf more being retained but you wouldn’t know about it enough to maintain a ref to the root mode?


In a language with tracing GC, you'd use a strong reference in both directions, so anybody who holds the child can always walk their way to the root (if you expose those references). Without such GC, you basically have to pass the root around, because it's what's holding all those children alive.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: