The previous article introduced. the basic principles of net garbage collection and the internal mechanism of implementing the Finalize method for garbage collection; this article describes weak reference objects, generation, and multi-thread
Pioneering ageDomesticProgramMost of the members felt the charm of the garbage collection technology for the first time in the Java language, so many people regard Java and garbage collection as an inseparable whole. But in fact, the garbage
Weak References: when the root object of a program points to an object, this object is reachable and cannot be recycled by the garbage collector, which is called a strong reference to the object. Strong references are relatively weak references.
SOURCE Link: Java garbage collection mechanism1. The meaning of garbage collectionIn C + +, the memory occupied by an object is occupied until the end of the program and cannot be assigned to other objects until it is explicitly released, whereas in
1. The meaning of garbage collectionIn C + +, the memory occupied by an object is occupied until the end of the program and cannot be assigned to other objects until it is explicitly released, whereas in Java the memory becomes garbage when there is
1. The meaning of garbage collectionIn C + +, the memory occupied by an object is occupied until the end of the program and cannot be assigned to other objects until it is explicitly released, whereas in Java the memory becomes garbage when there is
The working principle of the Java garbage collection mechanism.
Java's heap is a run-time data area in which instances (objects) of the class allocate space. The Java Virtual machine (JVM) heap stores all objects that are established by the running
The Java heap is a runtime data zone, and the instance (object) of the class allocates space from it. The Java Virtual Machine (JVM) Heap stores all objects created by running applications. These objects are created through commands such as new,
Off 1. The meaning of garbage collectionIn C + +, the memory occupied by an object is occupied until the end of the program and cannot be assigned to other objects until it is explicitly released, whereas in Java the memory becomes garbage when
1. The meaning of garbage collectionIn C + +, the memory occupied by an object is occupied until the end of the program and cannot be assigned to other objects until it is explicitly released, whereas in Java the memory becomes garbage when there is
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.