Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Isolating a reference

 
Chitta Ranjan Mahato
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thanks in advance
 
Paul Beckett
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
looks like an example of islands of isolation.
 
Rob Spoor
Sheriff
Pie
Posts: 20495
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you consider a reference as a bridge to the island, you first create three bridges from main to the three islands. You then build a bridge from the island named i2 to the island named i3, from i3 to i4 and from i4 to i2. Each island now has three bridges coming in: one from main and one from one of the other islands.

If you then assign null to your references, you break down the bridges from main. The islands cannot be reached from main anymore, but they still have bridges between each other. That's what's called an island of isolation as Paul has said.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic