From 39a545dcdb48f06c4c32fe3f85478aa0ebfd7fd1 Mon Sep 17 00:00:00 2001 From: Jon goldberg Date: Mon, 17 Jul 2017 00:50:42 -0400 Subject: [PATCH] Use the freeResult DAO method --- bin/cli.class.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/bin/cli.class.php b/bin/cli.class.php index d382591824..5020e8171b 100644 --- a/bin/cli.class.php +++ b/bin/cli.class.php @@ -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); -- 2.25.1