Skip to content

Instantly share code, notes, and snippets.

@simonwoo
Created April 23, 2015 12:49
Show Gist options
  • Select an option

  • Save simonwoo/9e1572c5afc4bb1fe1b6 to your computer and use it in GitHub Desktop.

Select an option

Save simonwoo/9e1572c5afc4bb1fe1b6 to your computer and use it in GitHub Desktop.

java内存管理包括两个方面:

  • 内存分配--创建内存时JVM为该对象在堆内存所分配的空间。
  • 内存回收--java对象失去引用变成垃圾时,JVM的垃圾回收机制自动清理该对象,并收回该对象的内存。

JVM的垃圾回收机制是由一条后台线程完成。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment