Java memory leaks

Source: Internet
Author: User

In general, there are two cases of memory leaks, in the case of a C + + language in which memory allocated in the heap is not freed, and all of its access to the memory is removed (for example, a pointer re-assignment). This situation is like, occupying the land, others have not been able to quote, and did not release space, memory leaks.

The other is that the memory and its references are still preserved when the memory object is clearly not needed.

The first case, in Java has been due to the existence of GC, has been well resolved. So the memory leak in Java is primarily the second type.

Performance: A memory-to-sexual life cycle exceeds the length of time that the program needs it.

Java memory leaks

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.