r20569 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r20568‎ | r20569 | r20570 >
Date:22:17, 20 March 2007
Author:mkroetzsch
Status:old
Tags:
Comment:
LinkCache seems to be a memory leak. Now cleared regularly. Maybe someone should make a MAX_CACHE_SIZE
implementation as for the Title cache ...
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/specials/ExportRDF/SMW_SpecialExportRDF.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/specials/ExportRDF/SMW_SpecialExportRDF.php
@@ -437,6 +437,7 @@
438438 }
439439 $this->extra_namespaces = array();
440440 $this->printHeader(); // also inits global namespaces
 441+ $linkCache =& LinkCache::singleton();
441442
442443 $start = 1;
443444 $end = $this->db->selectField( 'page', 'max(page_id)', false, $fname );
@@ -477,6 +478,7 @@
478479 fwrite($file, $this->post_ns_buffer);
479480 $this->post_ns_buffer = '';
480481 }
 482+ $linkCache->clear();
481483 }
482484 //DEBUG:
483485 $this->post_ns_buffer .= "<!-- Processed $a_count regular articles. -->\n";

Status & tagging log