Sunday, January 25, 2015

Javarevisited: How Garbage Collection works in Java

Javarevisited: How Garbage Collection works in Java

▼ How Garbage Collection works in Java I have read many articles on Garbage Collection in Java, some of them are too complex to understand and some of them don't contain enough information required to understand garbage collection in Java. Then I decided to write my own experience as an article. You can call it a tutorial about garbage collection in simple word, which would be easy to understand and have sufficient information to understand how garbage collection works in Java. Garbage collection works by employing several GC algorithm e.g. Mark and Sweep. There are different kinds of garbage collector available in Java to collect different area of heap memory e.g. you have serial, parallel and concurrent garbage collector in Java. A new collector called G1 (Garbage first) are also introduced in JDK 1.7.  First step to learn about GC is to understand when an object becomes eligible to garbage collection? Since JVM provides memory management,

Read full article from Javarevisited: How Garbage Collection works in Java

No comments:

Post a Comment