Fix memory delete_records + test.