Skip to content

Commit

Permalink
Memory Leak
Browse files Browse the repository at this point in the history
Worksheet points to Table, Table points back to Worksheet. Circular reference prevents garbage collection. Remove Table collection in Worksheet at destruct time to avoid this problem.
  • Loading branch information
oleibman committed Aug 17, 2023
1 parent 42c0757 commit dab858e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/PhpSpreadsheet/Worksheet/Worksheet.php
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ public function __destruct()

$this->disconnectCells();
$this->rowDimensions = [];
$this->removeTableCollection();
}

/**
Expand Down

0 comments on commit dab858e

Please sign in to comment.