Remove instances of $dao->free
The DAO object since ? 4.7.x? has been freed on _destruct. Using the $dao->free action has been demonstrated to create some rare bugs - ie. because query sets from the outer loop can be lost. There is no benefit in calling it any more and some harm
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- eileen mentioned in issue #558 (closed)
mentioned in issue #558 (closed)
We are removing a few of these each cycle (probably picking up pace) which is the approach we used with similar changes where we wanted to do it slowly in case of an adverse effects (although as with the removal of mysql LOWER we have done quite a few already & have reason to feel confident.
@ayduns did https://github.com/civicrm/civicrm-core/pull/13192 in 5.10. Am about to add one for 5.11
5.12 PR https://github.com/civicrm/civicrm-core/pull/13786 - targets Cache classes, BAO_Contribution class, SchemaHandler
- eileen mentioned in issue #817 (closed)
mentioned in issue #817 (closed)
- Owner
doing a grep these are the only places i believe free() is called from now
CRM/Utils/System/DrupalBase.php: $config->free(); CRM/Utils/System/Backdrop.php: $config->free(); CRM/Utils/System/Backdrop.php: $match->free(); CRM/Utils/System/WordPress.php: $match->free(); CRM/Utils/System/Joomla.php: $match->free(); CRM/Utils/System/Drupal6.php: $match->free(); CRM/Utils/System/Drupal.php: $match->free(); CRM/Utils/System/Drupal8.php: $match->free(); CRM/Utils/System/Drupal8.php: $config->free(); CRM/Core/DAO.php: $this->free(); CRM/Core/DAO.php: $fkDAO->free(); CRM/Core/DAO.php: $depObject->free(); CRM/Core/DAO.php: $depObject->free(); CRM/Core/DAO.php: $depObject->free(); CRM/Core/DAO.php: $this->free(); CRM/Core/DAO.php: $this->free(); CRM/Core/DAO.php: $this->free(); CRM/Core/DAO.php: $object->free(); CRM/Core/DAO.php: $object->free(); CRM/Core/DAO.php: $_dao->free(); CRM/Core/DAO.php: $_DB_DATAOBJECT['RESULTS'][$id]->free(); install/index.php: $c->free(); install/index.php: $c->free(); install/index.php: $c->free(); install/index.php: $c->free(); packages/DB.php: $this->free(); packages/DB.php: $this->free(); packages/DB.php: $this->free(); packages/DB.php: $this->free(); packages/HTML/Template/ITX.php: $this->free(); packages/HTML/Template/IT.php: $this->free(); packages/HTML/QuickForm/select.php: $result->free(); packages/DB/DataObject.php: $t->free(); packages/DB/DataObject.php: $obj->free(); packages/DB/DataObject.php: $obj->free(); packages/DB/DataObject.php: $this->{$do}->free(); packages/DB/common.php: $res->free(); packages/DB/common.php: $res->free(); packages/DB/common.php: $res->free(); packages/DB/common.php: $res->free(); packages/DB/common.php: $res->free(); packages/DB/Table/Manager/mysqli.php: $result->free(); packages/DB/Table/Manager/mysqli.php: $result->free(); packages/DB/Table/Manager/mysql.php: $result->free(); packages/DB/Table/Manager/mysql.php: $result->free(); packages/DB/Table/Manager/pgsql.php: $result2->free(); packages/DB/pgsql.php: $result->free(); packages/_ORIGINAL_/DB.php: $this->free(); packages/_ORIGINAL_/DB.php: $this->free(); packages/_ORIGINAL_/DB.php: $this->free(); packages/_ORIGINAL_/DB.php: $this->free(); packages/_ORIGINAL_/HTML/QuickForm/select.php: $result->free(); packages/_ORIGINAL_/DB/DataObject.php: $t->free(); packages/_ORIGINAL_/DB/DataObject.php: $obj->free(); packages/_ORIGINAL_/DB/DataObject.php: $obj->free(); release-notes/5.13.0.md:- **Remove more instances of ->free() tools/scripts/solr/createSyncJSON.php: $dao->free(); tools/scripts/solr/createSyncJSON.php: $dao->free(); tools/scripts/solr/createSyncJSON.php: $dao->free(); tools/scripts/solr/createSyncJSON.php: $dao->free(); tools/scripts/solr/createSyncJSON.php: $dao->free(); tools/scripts/solr/createSyncJSON.php: $dao->free(); tools/scripts/solr/createSyncJSON.php: $dao->free(); tools/scripts/solr/createSyncJSON.php: $aaDAO->free(); tools/scripts/solr/createSyncJSON.php: $atDAO->free(); vendor/pear/log/Log/mdb2.php: $this->_statement->free(); vendor/pear/log/Log/mdb2.php: $this->_statement->free();
@seamuslee cool - second half of those we should not touch so very close!
- eileen closed
closed