From 3893df8e5068f411ba16c2e37096e47c4ad102f2 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sun, 6 Feb 2011 15:16:10 +0000 Subject: FS#2154 unset call writers in finalise() to prevent circular references and help PHP garbage collection for PHP < 5.3 --- inc/parser/handler.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'inc/parser') diff --git a/inc/parser/handler.php b/inc/parser/handler.php index 4d0b56b44..85a353dca 100644 --- a/inc/parser/handler.php +++ b/inc/parser/handler.php @@ -720,6 +720,7 @@ class Doku_Handler_CallWriter { // function is required, but since this call writer is first/highest in // the chain it is not required to do anything function finalise() { + unset($this->Handler); } } @@ -764,6 +765,7 @@ class Doku_Handler_Nest { $this->process(); $this->CallWriter->finalise(); + unset($this->CallWriter); } function process() { @@ -817,6 +819,7 @@ class Doku_Handler_List { $this->process(); $this->CallWriter->finalise(); + unset($this->CallWriter); } //------------------------------------------------------------------------ @@ -1014,6 +1017,7 @@ class Doku_Handler_Preformatted { $this->process(); $this->CallWriter->finalise(); + unset($this->CallWriter); } function process() { @@ -1070,6 +1074,7 @@ class Doku_Handler_Quote { $this->process(); $this->CallWriter->finalise(); + unset($this->CallWriter); } function process() { @@ -1165,6 +1170,7 @@ class Doku_Handler_Table { $this->process(); $this->CallWriter->finalise(); + unset($this->CallWriter); } //------------------------------------------------------------------------ -- cgit v1.2.3