Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

LinkedIn Learning

Java Memory Management

via LinkedIn Learning

Overview

Explore effective memory management in Java in this course, one of two installments in the lively Java Memory Management series.

Syllabus

Introduction
  • Make beautiful stack overflow errors
  • What you should know
  • Explore the code challenge environment
1. Java Memory Explained
  • What is Java memory?
  • The importance of understanding Java memory
  • JVM and memory management
  • Stack memory
  • Heap memory
  • Heap vs. stack
2. Values vs. References
  • Primitives
  • Objects
  • Final classes and immutable objects
  • Strings in memory
  • Primitives and objects in memory
  • Solution: Making an object immutable
3. Careful: Escaping References
  • The problem of escaping references
  • Collections and escaping references
  • Avoiding escaping collection references
  • Example custom objects: References on the loose
  • Avoiding escaping references
  • Solution: Fixing an escaping reference
4. Quick Peek at Next Steps
  • Garbage collection
  • JVM tuning
  • Spotting and avoiding memory leaks
  • Solution: Fix the memory leak
Conclusion
  • Next steps with Java memory management

Taught by

Matt Greencroft

Reviews

4.7 rating at LinkedIn Learning based on 464 ratings

Start your review of Java Memory Management

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.