Java Memory Management: Values and References
1h 11mIntermediate2021-12-07
Authors
Maaike van Putten
Trainer and Developer for Java, Python, Spring Boot, and More
Course details
It's undeniably frustrating to need to restart an application due to performance issues. Did you know that this is often caused by poor memory management, though? Not only do you have the power to address it as a Java developer—you can prevent it altogether. In this course, instructor Maaike van Putten offers you a detailed look at how to deploy effective memory management solutions in Java.
Explore what gets stored where and why, and how you can exploit the differences to your advantage as a developer. Learn more about heap vs. stack storage, focusing on values, references, objects, and primitives, as well as their implications for better memory management. Get tips on escaping references and garbage collections as you develop your eye for seeing—and solving—new types of problems in your code.
Explore what gets stored where and why, and how you can exploit the differences to your advantage as a developer. Learn more about heap vs. stack storage, focusing on values, references, objects, and primitives, as well as their implications for better memory management. Get tips on escaping references and garbage collections as you develop your eye for seeing—and solving—new types of problems in your code.
Skills covered
JavaProgramming FoundationsOracleProgramming LanguagesSoftware DevelopmentDeep Dive (X:Y)
Concepts
0. Introduction
- 01 - Make beautiful stack overflow errors
- 02 - What you should know
1. Java Memory Explained
- 03 - What is Java memory
- 04 - The importance of understanding Java memory
- 05 - JVM and memory management
- 06 - Stack memory
- 07 - Heap memory
- 08 - Heap vs. stack
2. Values vs. References
- 09 - Primitives
- 10 - Objects
- 11 - Final classes and immutable objects
- 12 - Strings in memory
- 13 - Primitives and objects in memory
3. Careful - Escaping References
- 14 - The problem of escaping references
- 15 - Collections and escaping references
- 16 - Avoiding escaping collection references
- 17 - Example custom objects - References on the loose
- 18 - Avoiding escaping references
4. Quick Peek at Next Steps
- 19 - Garbage collection
- 20 - JVM tuning
- 21 - Spotting and avoiding memory leaks
Conclusion
- 22 - Next steps with Java memory management