How does the Garbage collector decide .......a object is out of scope..............when a object is created and if the doesn't have any reference in program will it be garbage collected the next time it run's
It is a popular and interesting topic with many write-ups, contributions, discussions, articles around.
Fortunately there are search engines to locate them, including these: