Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. COMaybe I don't understand this, but does this answer the question? I see all answers describe finalizer behavior, but that seems kind of offtopic. Suppose `A` is "alive". It has only a weak reference to `B`. Clearly `B`-`C` are strongly connected. But can they be considered a "dead island", not referenced by "reachable" references? If `B`-`C` is dead, can we be sure `ClassB.DoSomething()` is not running? I guess this is what the Original Poster asked?
      singulars
    2. CO@Jeppe Stig Nielsen I believe both Marc Gravell and dthorpe answered my question in the first few sentences of their posts. The extra information about finalizers was really just a bonus. The conclusion I took away from it is that it is always safe to access an object via a strong reference under all circumstances other than inside a finalizer. I trust that this includes the scenario that I addressed in my question where both the object holding the reference (B) and the referee (C) are on an island that is eligible for garbage collection.
      singulars
    3. CO@knick OK, but Marc is saying _"then if the ClassB is still alive you don't need to worry [...]"_. But maybe the reason not to worry is that the `B` instance becoms alive again (from the dead?) when you pick up `.Target` on your weak reference? So how can the GC work? It can't know that someone might wake up `B` at any point in time. Will it collect `B` first, then `C`, because there's only a strong reference in one direction? (What if there were strong references in both directions, between `B` and `C`?)
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload