void SingleWindow::clear() { if (cohorts.size() > 1) { for (uint32FlatHashMap::iterator iter = parent->relation_map.begin(); iter != parent->relation_map.end();) { if (iter->second <= cohorts.back()->global_number) { iter = parent->relation_map.erase(iter); } else { ++iter; } } } foreach (iter, cohorts) { free_cohort(*iter); }
void SingleWindow::clear() { if (cohorts.size() > 1) { for (uint32FlatHashMap::iterator iter = parent->relation_map.begin(); iter != parent->relation_map.end();) { if (iter->second <= cohorts.back()->global_number) { iter = parent->relation_map.erase(iter); } else { ++iter; } } } for (auto iter : cohorts) { free_cohort(iter); } if (next && previous) { next->previous = previous; previous->next = next; } else { if (next) { next->previous = 0; } if (previous) { previous->next = 0; } } number = 0; has_enclosures = false; next = 0; previous = 0; parent = 0; text.clear(); cohorts.clear(); valid_rules.clear(); hit_external.clear(); for (auto& cs : rule_to_cohorts) { cs.clear(); } variables_set.clear(); variables_rem.clear(); variables_output.clear(); bag_of_tags.clear(); }
foreach (iter, removed) { free_cohort(*iter); }