Previous | Next | Trail Map | Reference Objects | Contents

Reference Objects

by Monica Pawlan
of the Java Developer Connection (JDC)

The Reference Objects application programming interfaces (API) let a program maintain special references to objects that allow the program to interact with the garbage collector in limited ways. Not all programs require this level of interaction with the garbage collector. For example, a program that keeps a lot of objects in memory or a program that needs to perform cleanup operations on related objects before an object is reclaimed might be good candidates for using the Reference Objects API.

Because it is essential to understand garbage collection before you can understand how reference objects work, this trail begins with a lesson on garbage collection and concludes with a lesson on reference objects:

Understanding Garbage Collection explains how garbage collection works in the Java Virtual Machine (VM) and what happens when reference objects are added to the heap.

All About Reference Objects covers everything you need to know to use reference objects in applications.



Note: This is a draft! Please send comments and suggestions on this trail to tutorial@java.sun.com. Put Reference Objects in the subject. Your feedback is important to us.


Previous | Next | Trail Map | Reference Objects | Contents