Learn Java Programming - Garbage Collection Tutorial

preview_player
Показать описание
I want to begin by saying that this tutorial will introduce you to a memory management concept that may as well be controlled by the Wizard of OZ. The topics of garbage collection and the finalize method go hand in hand and I will cover the finalize method in the next tutorial. So what is Garbage Collection? Good question, in order to answer that I first need to provide a brief explanation of a memory location called the 'heap'. The heap is where your object data is stored. Every time you use the new operator to allocate and initialize an object, the Java Virtual Machine (JVM) creates your new object in a memory space on the heap and returns a reference to where your object is located. The size of the heap memory is largely determined by the amount of memory available on the device that you are running the JVM on - in this case, your computer. Let's begin by creating some new objects and displaying their object reference values to the console when the no-argument constructor is initialized.
Рекомендации по теме
Комментарии
Автор

Awesome video...thanks! #insta-subscribe

ryandavis
welcome to shbcf.ru