Possible Duplicate:
Garbage collection behaviour for String.intern()
How does Java store Strings and how does substring work internally?
According to me the String reference when declared as null doesn’t deletes the entry from String literal pool and i want to know how we can clear it .
String object="csk";// creates an Object in Java Heap and makes an entry String Literal Pool .
object=null// however make this reference to null object .
//but it doesn’t deletes an entry from String literal .I doubt if it deletes an entry from Literal Pool
String literals (WeakHashMap) are also stored in heap memory called the “permgen” heap.
need to configure in JVM to find and collect dynamically loaded classes that are no longer needed, and this may cause String literals to be garbage collected.
and or when JVM performas the Full gc.