Skip to main content

Garbage Collection

  • Chapter
  • First Online:
Java for Absolute Beginners
  • 2892 Accesses

Abstract

When executing Java code, objects are created, used and discarded repeatedly from memory. The process through which unused Java objects are discarded is called memory management, but is most commonly known as garbage collection (GC). garbage collection was mentioned in Chapter 5 as it was needed for explaining the difference between primitive and reference types, but in this chapter we go deep into the under the hood of the JVM to resolve yet another mystery of a running Java application.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 29.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    This VM option replaces deprecated -XX:+PrintGCDetails

  2. 2.

    If you want more details about GC this article is on point: https://www.oracle.com/technetwork/tutorials/tutorials-1876574.html

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Iuliana Cosmina

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Cosmina, I. (2018). Garbage Collection. In: Java for Absolute Beginners. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-3778-6_13

Download citation

Publish with us

Policies and ethics