How does garbage collection work?

Asked By 7060 points N/A Posted on -
qa-featured

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?

SHARE
Best Answer by Sharath Reddy
Best Answer
Best Answer
Answered By 563960 points N/A #80812

How does garbage collection work?

qa-featured

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.

Garbage collection in JVM is called marking
Answered By 0 points N/A #80815

How does garbage collection work?

qa-featured

Hello Dear,

Garbage Collection in Java Virtual Machine is used for freeing dynamically allocated memory that is no longer referenced. Following is the link from where you can get the complete tutorial for garbage collection, its syntax and error removing.

http://javarevisited.blogspot.in/2011/04/garbage-collection-in-java.html

Following is another link for code for garbage collection in Java virtual machine. You can try this as well.

http://www.roseindia.net/java/example/java/io/code-for-garbage-collection.shtml

Regards,

Patrickk wilkins

Login/Register to Answer

Related Questions