Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4d6508b

Browse filesBrowse files
committed
修改格式
对于个人理解部分修改了下格式
1 parent ecc7b1e commit 4d6508b
Copy full SHA for 4d6508b

File tree

Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed

‎contents/creating-a-memory-leak-with-java.md

Copy file name to clipboardExpand all lines: contents/creating-a-memory-leak-with-java.md
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@
2424
这种方法在许多的JVM的实现中表现很糟糕,因为Classes和ClassLoader被直接存储在老年代(permgen)并且永远都不会被GC处理。
2525

2626
******************************下方为个人理解************************************
27+
2728
通过一个简单的图来描述上述关系:
2829
ThreadLocal.obj ---> B.obj ---> B.class <--> ClassLoader.obj
2930
注:上图的\*.obj表示\*类的一个实例对象,B.class表示类B的Class对象
31+
3032
******************************上方为个人理解************************************
3133

3234
这个模式的一个变形:为什么应用容器(例如Tomcat)可以像筛子一样泄漏内存,如果你频繁的重新部署那些可能使用ThreadLocals的应用。

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.