What is the garbage collection?

Showing Answers 1 - 9 of 9 Answers

chap22

  • Feb 27th, 2006
 

gc - when a object looses focus in a particular context and is no longer needed it becomes a burden on the entire prog, so either a u or compiler can force gc and flush out the same to free the mem

  Was this answer useful?  Yes

Guest

  • Mar 3rd, 2006
 

Simply put, garbage collection (gc) is an automatic, periodic action undertaken by the Java VM where objects marked as unused in the heap are sought out and disposed of. The System.gc call can be used to manually invoke this process, but there is no guarantee that the VM can complete the call at the time that it is made.Although effective, the default collector isn't very performance-friendly as it runs on the main thread, blocking application execution until collection has finished. Since Java 1.4.1, there are three additional gc solutions to help preserve performance; these are selectable through the command-line interface.

  Was this answer useful?  Yes

sharad

  • Mar 7th, 2006
 

gabage collection is used in java to reclaimed the memory from objects automaticaly.

  Was this answer useful?  Yes

hi

Garbage collection is a mechanism performed by JVM when an object beomes unreachable.

eg

String s1="amit"

String s2=s1+"naveen";

The handle s1 can be garbage collected.

This is invoked when there is  no  memory to execute program.In java this is handled by JVM  and programmer donot have to care about it.

  Was this answer useful?  Yes

nirmala

  • Mar 20th, 2006
 

garbage collection takes the responsibility  to realising the objects impilicitly

  Was this answer useful?  Yes

sankris

  • Mar 23rd, 2006
 

In computer science, garbage collection (also known as GC) is a form of automatic memory management. The garbage collector or collector attempts to reclaim garbage, or memory used by objects that will never again be accessed or mutated by the application

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions