Asked By
anonymous
7060 points
N/A
Posted on - 09/30/2011
I am a new worker in Java,
I want to JVM performs garbage collection but I can't It shall be helpful if any person gives me a good advice.
What is the correct syntax for suggesting that the JVM perform garbage collection?
How does garbage collection work?
Garbage collection in JVM is called marking. It collects application graph from where it begins, it's root objects that represent all active stack frames and static variables that loaded into the application.
Garbage collector once meets object are met, then it'll be marked as used and it won't be deleted once sweeping stage is run.
JVM stores data object by the use of executable files in Java application. This garbage collection implies that the object is not needed and the program will function it's job to delete and or thrown this away.