XYXin Yaoinxyao.hashnode.dev·Feb 2, 2023 · 2 min readWhat's ThreadLocal in Java and how it causes memory leak?This article is just for self-learning. To understand this question, we need to know what is WeakReference in Java. What's WeakReference? In short, any WeakReference object in Java will be cleaned up whenever garbage collection determines to do so. W...00
XYXin Yaoinxyao.hashnode.dev·Feb 2, 2023 · 3 min readNormal, Soft, Weak, Phantom References in Java/This article is just for self-learning. Normal 强引用 final M m = new M(); m = null; This is usually how we define an object. Once m is reassigned to null, the original assigned new M() will be garbage collected. So, a normal reference object will be ...00
XYXin Yaoinxyao.hashnode.dev·Nov 1, 2021 · 3 min readNetwork Programming - UDP and TCP in JavaWhat's network programming? Shortly, it's a program running on multiple devices over the internet to help send and receive the data. This article is mainly used for self-learning and practice. Hope it is helpful and clear for beginners! Terminologies...00