The Artima Developer Community
Sponsored Link

Java Answers Forum
references

2 replies on 1 page. Most recent reply: Oct 19, 2007 6:49 AM by istiaq sh

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
durga devi

Posts: 2
Nickname: devi21
Registered: Oct, 2007

references Posted: Oct 7, 2007 8:37 AM
Reply to this message Reply
Advertisement
what is a strong reference and a weak reference and what is the difference between them?


Pankaj Shinde

Posts: 2
Nickname: pank
Registered: Feb, 2004

Re: references Posted: Oct 16, 2007 10:28 PM
Reply to this message Reply
When an object is reachable from the root set by some chain of ordinary references (no reference objects involved), that object is said to be strongly reachable.

The Reference Object API gives us strength of the object reachability. We can have softly, weakly and phantomly reachable objects and gain a limited amount of interaction with the garbage collector according to the strength of the object's reachability.

If the only ways to reach an object involve at least one weak reference object, the object is said to be weakly reachable. An object is considered by the garbage collector to be in use if it is strongly reachable. Weakly reachable objects, like unreachable objects, are eligible for collection.

The java.sun site has a good article on Strong and weak reference.

Here is a link
http://java.sun.com/developer/technicalArticles/ALT/RefObj/

Please have a look,

istiaq sh

Posts: 3
Nickname: tryq
Registered: Oct, 2007

Re: references Posted: Oct 19, 2007 6:49 AM
Reply to this message Reply
Try to find it here, recently I came across a good Java site

http://question2answer.googlepages.com

Flat View: This topic has 2 replies on 1 page
Topic: references Previous Topic   Next Topic Topic: Reading a CSV file from client on Server

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use