"Fossies" - the Fresh Open Source Software Archive

Member "groupoffice-6.4.210-php-71/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/05-Deleting-a-Workbook.md" (22 Nov 2018, 755 Bytes) of package /linux/www/groupoffice-6.4.210-php-71.tar.gz:

As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format). Alternatively you can here view or download the uninterpreted source code file. A member file download can also be achieved by clicking within a package contents listing on the according byte size field.

PHPExcel Developer Documentation

Clearing a Workbook from memory

The PHPExcel object contains cyclic references (e.g. the workbook is linked to the worksheets, and the worksheets are linked to their parent workbook) which cause problems when PHP tries to clear the objects from memory when they are unset(), or at the end of a function when they are in local scope. The result of this is “memory leaks”, which can easily use a large amount of PHP’s limited memory.

This can only be resolved manually: if you need to unset a workbook, then you also need to “break” these cyclic references before doing so. PHPExcel provides the disconnectWorksheets() method for this purpose.