Skip to content

Commit

Permalink
Clear table collection indexes early each generation.
Browse files Browse the repository at this point in the history
  • Loading branch information
molpopgen committed Jan 24, 2024
1 parent 1cd67ff commit ac6ac73
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/evolve_discrete_demes/evolve_generation_ts.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,12 @@ evolve_generation_ts(
offspring.clear();
offspring_metadata.clear();

// Clear table indexes each generation.
// This is a "safety" guard against erroneous use
// at runtime.
pop.tables->input_left.clear();
pop.tables->output_right.clear();

// Generate the offspring
auto next_index_local = next_index;

Expand Down

0 comments on commit ac6ac73

Please sign in to comment.