|
|
|
|
Behavior of the garbage collector
Home » Java » General Java
Behavior of the garbage collector
A Java programmer does not have to worry about memory management, because it is automatically taken care of by the garbage collector. The Java virtual machine (JVM) decides when to run the garbage collector. The garbage collector is a low priority thread that runs periodically, releasing memory used by objects that are not needed anymore.
Behavior of the garbage collector page 1 of 5
A Java programmer does not have to worry about memory management, because it is automatically taken care of by the garbage collector. The Java virtual machine (JVM) decides when to run the garbage collector. The garbage collector is a low priority thread that runs periodically, releasing memory used by objects that are not needed anymore.
The garbage collection (GC) algorithm varies from one JVM to another. There are different algorithms being used, like reference counting or the mark and sweep algorithm. See Resources for more information on garbage collection.
Running the
|
More Tutorials by this user
|
|
|
|
|
|
|
|
|