Simple Accessibility Analysis

First by a series of GC roots root node. Searching down from the GC Roots object as the starting point, the path traversed becomes the reference chain. When an object does not have any reference chain to GC Roots, the object is inactive. When the object is not alive, it can also save itself through the finalize() method.

Objects that can be used as GC Roots include: 1. Objects referenced by constants in the method area 2. Objects referenced by static properties in the method area 3. Objects referenced in the virtual machine stack 4. Objects referenced in local methods

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324410973&siteId=291194637