在这里我推荐一位朋友写的不错的文章:对象的分配及垃圾回收机制——JVM(2):https://blog.csdn.net/afdafvdaa/article/details/119778385