Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -143,6 +143,15 @@ |
144 | 144 | } |
145 | 145 | |
146 | 146 | /** |
| 147 | + * Reduce memory usage to reduce the impact of circular references |
| 148 | + */ |
| 149 | + function __destruct() { |
| 150 | + foreach ( $this as $name => $value ) { |
| 151 | + unset( $this->$name ); |
| 152 | + } |
| 153 | + } |
| 154 | + |
| 155 | + /** |
147 | 156 | * Do various kinds of initialisation on the first call of the parser |
148 | 157 | */ |
149 | 158 | function firstCallInit() { |