News for hackers. Stuff that matters.
Re:Reference count, don't garbage collect by mbrodersen on Sunday July 31, 2022 @05:55AM (#32294489)
You typically use a weak pointer from child to parent in those situations. So there are no ownership cycles. Languages without garbage collectors (C/C++) pretty much require you to not have ownership cycles or your code will crash during cleanup. Unless you add specific code to detect it and stop it from happening. So I assume you mostly work in GC languages and not C/C++?
Re:Reference count, don't garbage collect by wizofaus on Sunday July 31, 2022 @04:05PM (#32298320)
We were talking about Nim, which is language I know next to nothing about (but very familiar with C/C++, Swift - which has weak pointers, as well as GC languages like JavaScript/Java/C# etc.)