Memory management in JAVA

Yaodong Bi, John A. Beidler · Journal of computing sciences in colleges · 2018

The Java programming language has been a major language used in the industry and adopted by academia in introductory courses of computer science programs. Its capability of garbage collection has led many students to a false perception that, since the language automatically collects all unused objects, the programmer would not need to pay attention to memory management. Computer science educators have not emphasized enough the importance of memory management and some have totally ignored it. This is evidenced in student assignments and in textbooks written for the first three courses of the ACM Computer Science curriculum. This paper tries to bring memory management to the front of computer science education by first presenting the concept of object loitering and then introducing Java's three different types of references (soft, weak, and phantom references), which are designed to help in solving common memory management problems. This paper is not aimed to provide a comprehensive coverage on the three types of Java reference; rather it intends to bring the awareness of them to all computer science educators.

Read the paper · More papers on PaperTik