解决办法 在 PHPExcel_Worksheet 类中增加方法:
代码如下 复制代码
1public function Destroy() { 2 foreach($this->_cellCollection as $index => $dummy) { 3 $this->_cellCollection[$index] = null; 4 }
}
并在 PHPExcel 类中增加方法:
1public function destroy() { 2 foreach($this->_workSheetCollection as $index => $dummy) { 3 $this->_workSheetCollection[$index]->Destroy(); 4 $this->_workSheetCollection[$index] = null; 5 } 6}
$phpExcel->destroy();
记录一下