Skip to content

Commit

Permalink
Merge pull request #10537 from PalanteJon/20754
Browse files Browse the repository at this point in the history
CRM-20754 - Clear memory leak in CSV CLI import
  • Loading branch information
monishdeb authored Jul 17, 2017
2 parents 1f59126 + 39a545d commit 8bad8b1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bin/cli.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,10 @@ public function run() {
continue;
}
$this->row++;
if ($this->row % 1000 == 0) {
// Reset PEAR_DB_DATAOBJECT cache to prevent memory leak
CRM_Core_DAO::freeResult();
}
$params = $this->convertLine($data);
$this->processLine($params);
}
Expand Down

0 comments on commit 8bad8b1

Please sign in to comment.