I have a question. I was reading in a blog about substring.Quoting it below.
One point which is worth remembering here is that substring is also backed up by character array, which is used by original String. This can be dangerous if original string object is very large and substring is very small, because even a small fraction can hold reference of complete array and prevents it from being garbage collected even if there is no other reference for that particular String
I am not able to understand what does it mean to say a small reference can prevent from garbage collection. Can someone explain this concept? Thanks