Java Memory Management

suggest change

Remarks

In Java, objects are allocated in the heap, and heap memory is reclaimed by automatic garbage collection. An application program cannot explicitly delete a Java object.

The basic principles of Java garbage collection are described in the Garbage collection example. Other examples describe finalization, how to request a garbage collection, and the problem of storage leaks. System.gc only asks for a collection; it does not force one.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents