This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Isolating a reference Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Isolating a reference" Watch "Isolating a reference" New topic

Isolating a reference

Chitta Ranjan Mahato
Ranch Hand

Joined: Jun 20, 2009
Posts: 38

Thanks in advance
Paul Beckett
Ranch Hand

Joined: Jun 14, 2008
Posts: 96
looks like an example of islands of isolation.
Rob Spoor

Joined: Oct 27, 2005
Posts: 20078

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.

How To Ask Questions How To Answer Questions
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Isolating a reference
It's not a secret anymore!