我有一个理论,即CLR垃圾回收机制意味着我可以逃脱我的对象层次循环引用不会产生死锁的拆卸和垃圾收集。这是一个安全的假设做什么呢? (目标语言VB.NET)
I have a theory that the CLR garbage collection mechanism means that I can get away with circular references in my object hierarchy without creating deadlocks for teardown and garbage collection. Is this a safe assumption to make? (Target language VB.NET)
在.NET垃圾收集器是一个辈分标记和清扫收集器。它不使用引用计数。所以,是的,它是安全的,有循环引用。 语言是无关紧要的。
The .NET garbage collector is a generational mark and sweep collector. It does not use reference counting. So yes, it's safe to have circular references. Language is irrelevant