Strong References | Soft References | Weak References And Phantom References in java

preview_player
Показать описание
Types Of References In Java : Strong, Soft, Weak And Phantom
In this video we will learn Types Of References In Java : Strong, Soft, Weak And Phantom using a demo project
Depending upon how objects are garbage collected, references to those objects in java are grouped into 4 types. They are,
1) Strong References
2) Soft References
3) Weak References
4) Phantom References
Below is the GitHub link to download source:
Рекомендации по теме
Комментарии
Автор

why are you nullifying ?? isn't it supposed to be garbage collected after the method execution is over ? in practice you don't nullify objects...

diegoramos
Автор

in case of weak reference there is no need to make the emp = null, the whole concept of weak reference is that only ... if an object is made with a weak refernce than it will be a part of next GC cycle Suggestions are open ... plzz coreect me if i am wrong 🙂

SurajYadav-ydcu
Автор

I didn't understand phantom reference

rahulsrivastava
Автор

Phantom reference not clear understanding

Ankit-vpnt