GCIntro.pdf
(
261 KB
)
Pobierz
Project Sun SPOT Overview
Introduction to
Gargbage Collection (GC)
Sang Shin
Technology Evangelist
Technology Evangelist
Sun Microsystems, Inc.
Sun Microsystems, Inc.
www.javapassion.com
1
Introduction to
Gargbage Collection (GC)
Sang Shin
Topics
•
What is Garbage Collection (GC)?
•
Why GC?
•
When does GC occur?
•
How does GC get performed?
2
What is Garbage
Collection (GC)?
What is Garbage
Collection (GC)?
What is GC?
•
The Java virtual machine's heap stores all objects
created by a running Java application.
•
Objects are created by the program through
new
keyword, but never freed explicitly by the program
>
No need to call free().
•
Garbage collection is the process of automatically
freeing objects that are no longer needed
•
An object is determined to be “no longer needed” when
there is no other object referencing to it
>
Each object has a reference counter - when it becomes 0, it
means there is no other object referencing to it
4
Why Garbage
Collection (GC)?
Why Garbage
Collection (GC)?
Plik z chomika:
mystiqal
Inne pliki z tego folderu:
1-javaprogbasics.pdf
(390 KB)
2-javainputkey.pdf
(227 KB)
3-javacontrol.pdf
(370 KB)
commandarguments.pdf
(492 KB)
GCIntro.pdf
(261 KB)
Inne foldery tego chomika:
Zgłoś jeśli
naruszono regulamin