Skip to Main Content
THE Java™ Programming Language, Fourth Edition
book

THE Java™ Programming Language, Fourth Edition

by Ken Arnold, James Gosling, David Holmes
August 2005
Intermediate to advanced content levelIntermediate to advanced
928 pages
20h 39m
English
Addison-Wesley Professional
Content preview from THE Java™ Programming Language, Fourth Edition

Chapter 17. Garbage Collection and Memory

 

Civilization is a limitless multiplication of unnecessary necessaries.

 
 --Mark Twain

The Java virtual machine uses a technique known as garbage collection to determine when an object is no longer referenced within a program, and so can be safely reclaim466466ed to free up memory space. This chapter teaches the basic ideas behind garbage collection, how the programmer can be involved in the garbage collection process, and how special reference objects can be used to influence when an object may be considered garbage.

Garbage Collection

Objects are created with new, but there is no corresponding delete operation to reclaim the memory used by an object. When you are finished with an object, you simply stop ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

The C++ Programming Language, 4th Edition

The C++ Programming Language, 4th Edition

Bjarne Stroustrup
C Programming Language, 2nd Edition

C Programming Language, 2nd Edition

Brian W. Kernighan, Dennis Ritchie
The Go Programming Language

The Go Programming Language

Alan A. A. Donovan, Brian W. Kernighan

Publisher Resources

ISBN: 0321349806Purchase book