diff --git a/modules/node/node.module b/modules/node/node.module index 2f56c79fee7702d9d6b56d4d3c6f6cba2ad9c98e..516595a55ca7592dc181396be50cb454ae2bf65b 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -958,7 +958,9 @@ function _node_save_revision(&$node, $uid, $update = NULL) { */ function node_delete($nid) { - $node = node_load($nid); + // Clear the cache before the load, so if multiple nodes are deleted, the + // memory will not fill up with nodes (possibly) already removed. + $node = node_load($nid, NULL, TRUE); if (node_access('delete', $node)) { db_query('DELETE FROM {node} WHERE nid = %d', $node->nid);