Free the DAO, if it comes back it's yours
authoreileen <emcnaughton@wikimedia.org>
Thu, 10 Dec 2015 04:19:18 +0000 (17:19 +1300)
committereileen <emcnaughton@wikimedia.org>
Mon, 14 Dec 2015 19:33:05 +0000 (08:33 +1300)
Change-Id: Ida6c2a316f3fb5f505f7b24667e88fead174ce08

CRM/Contact/BAO/Query.php
CRM/Contribute/Form/Task.php

index 798f730e8afb26f7def00f3c5eb42587666fbc83..802fef5d65fb71892e6fae82333cdd298e3e5bce 100644 (file)
@@ -4635,6 +4635,7 @@ civicrm_relationship.is_permission_a_b = 0
       while ($dao->fetch()) {
         $ids[] = $dao->id;
       }
+      $dao->free();
       return implode(',', $ids);
     }
 
index 984256b27d23572f102092f1fcf6ff97553dc183..7ecf9b7ce6707d8273b94b850a4a01e0de8f2b6c 100644 (file)
@@ -143,6 +143,7 @@ class CRM_Contribute_Form_Task extends CRM_Core_Form {
           $contributionContactIds["{$result->contact_id}-{$result->contribution_id}"] = $result->contribution_id;
         }
       }
+      $result->free();
       $form->assign('totalSelectedContributions', $form->get('rowCount'));
     }