【发布时间】:2016-08-26 20:01:42
【问题描述】:
当我在 apache POI 中使用 CellStyle 创建新的单元格样式时,两个样式对象似乎共享相同的堆内存地址。
这怎么可能?
请看下面的例子:
CellStyle style1 = workbook.createCellStyle();
CellStyle style2 = workbook.createCellStyle();
当我调试代码时,style1 和 style2 与 org.apache.poi.xssf.usermodel.XSSFCellStyle@a1409f7c 具有相同的内存地址
谁能解释一下这种奇怪的行为?
谢谢 阿斯维尼J
【问题讨论】:
标签: java apache-poi heap-memory