civiCRM API and memory release
I read in one of the bug threads a resolve to fix the memory issue while manipulatig with contacts in civicrm. What it said was to use
CRM_Core_DAO::freeResult( );
ThisĀ reset the DB_DO global array so we can reuse the memory. But I am again a doubting guy so what I used to is free or release dao object the very moment the desired task is hadled.
For eg:-
$upt_qry = “UPDATE civicrm_value_user_status_32 SET {$updt_req} “
.” WHERE user_type_131=\”%s\” AND entity_id=\”%s\” “;
$upt_qry = sprintf($upt_qry,mysql_escape_string($usertapeInfo['user_type']),
mysql_escape_string($crm_contact_id));
$result = CRM_Core_DAO::executeQuery( $upt_qry );
$result->free();
This I found really helpful in scenarios with low memory and iterative cycles. Please share with me your thoughts.
Loading...