dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9350615
)
Added __destruct(), for stable pseudo-branch
author
Tim Starling
<tstarling@users.mediawiki.org>
Tue, 26 Aug 2008 06:48:24 +0000
(06:48 +0000)
committer
Tim Starling
<tstarling@users.mediawiki.org>
Tue, 26 Aug 2008 06:48:24 +0000
(06:48 +0000)
includes/parser/Parser.php
patch
|
blob
|
history
diff --git
a/includes/parser/Parser.php
b/includes/parser/Parser.php
index
6e3b932
..
8bd9a03
100644
(file)
--- a/
includes/parser/Parser.php
+++ b/
includes/parser/Parser.php
@@
-142,6
+142,15
@@
class Parser
$this->mFirstCall = true;
}
+ /**
+ * Reduce memory usage to reduce the impact of circular references
+ */
+ function __destruct() {
+ foreach ( $this as $name => $value ) {
+ unset( $this->$name );
+ }
+ }
+
/**
* Do various kinds of initialisation on the first call of the parser
*/