Merge pull request #2348 from dlobo/CRM-13278
[civicrm-core.git] / CRM / Core / BAO / Note.php
index 57ddada393737578897a0ef48931a7b5ff8a972e..7044ad24db4fd8ac197ff4bd819fe44609099c06 100644 (file)
@@ -309,10 +309,12 @@ class CRM_Core_BAO_Note extends CRM_Core_DAO_Note {
       $childNote = new CRM_Core_DAO_Note();
       $childNote->id = $childId;
       $childNote->delete();
+      $childNote->free();
       $recent[] = $childId;
     }
 
     $return = $note->delete();
+    $note->free();
     if ($showStatus) {
       CRM_Core_Session::setStatus($status, ts('Deleted'), 'success');
     }