Commit 39a545dc authored by Jon goldberg's avatar Jon goldberg
Browse files

Use the freeResult DAO method

parent 0d379049
......@@ -432,11 +432,7 @@ class civicrm_cli_csv_file extends civicrm_cli {
$this->row++;
if ($this->row % 1000 == 0) {
// Reset PEAR_DB_DATAOBJECT cache to prevent memory leak
$GLOBALS['_DB_DATAOBJECT']['RESULTS'] = array();
$GLOBALS['_DB_DATAOBJECT']['RESULTSEQ'] = 1;
$GLOBALS['_DB_DATAOBJECT']['RESULTFIELDS'] = array();
// Forces garbage collection
memory_get_usage(TRUE);
CRM_Core_DAO::freeResult();
}
$params = $this->convertLine($data);
$this->processLine($params);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment