???????????????????????????????????????????
????class BadKey {
????// no hashCode or equals();
????public final String key;
????public BadKey(String key) { this.key = key; }
????}
????Map map = System.getProperties();
????map.put(new BadKey("key")?? "value"); // Memory leak even if your threads die.
????A4????????????????????????????hashmap??key????/?????????????????????????????????????й???????????????Щ????????Java???????й?????????????????????
????Runtime.addShutdownHook??????????????????removeShutdownHook??????ThreadGroup?????δ???????bug????????????????????ThreadGroup???????й???
??????????δ?????????????????????
?????????????ContextClassLoader??AccessControlContext??????ThreadGroup??InheritedThreadLocal????????????Щ???????????й?????????б???????????????????о????????????ThreadFactory???????????????????j.u.c.Executor???(java.util.concurrent)????????????????????????????????Σ?????????????????????????
????ThreadLocal???棬???????2????????????к?????ThreadLocal?????????????????????????????????????????????????ContextClassLoader??????й????????????????????ThreadLocal???檔
??????ThreadGroup??????????????????????????????ThreadGroup.destroy()?????????й????????????鯔???????????????????????????????顣
???????WeakHashMap??value???(???)????key??????????????????Ρ????????????Weak/SoftReference?????????ж???????????????á?
???????http(s)Э???java.net.URL?????????KeepAliveCache????ThreadGroup?????????????μ??????????????????????й?????д????????????????????????????????п??????й???(??Java7???????????????????????????????????????????????)
???????InflaterInputStream???????(????PNGImageDecoder)?д???new java.util.zip.Inflater()????????inflater??end()????????new?????????????????????????????????????????????????close()??????inflater????????????й??????????????????й????????finalizer????????????????native??棬????linux??oom_killer????????????????????????????????????native?????
????java.util.zip.Deflater???????????????????????????????????????Deflater??????????????Deflater????Inflater??????????end()??