Strong links in weak links

in Java, are strong links accessible from weakly reachable objects considered strong links?

Example:

  • I can access X with a weak link.
  • I can access Y weak link.
  • I can access X with a pointer from Y.
  • I can access the Y pointer from X.

If there is no other pointer to X and Y, I would expect them to collect garbage collection. I am wrong?

+3
source share
2 answers

Both objects can be collected in garbage; a strong link from a loosely coupled object is considered a weak link.

+4
source

Although the term strong link is used, it might be better to think in terms of ability to achieve.

, , - . , , . , - .

.

+6

All Articles