Skip to content

Commit

Permalink
this definitely still needs work...
Browse files Browse the repository at this point in the history
  • Loading branch information
KillingSpark committed Nov 28, 2024
1 parent d81c76b commit 7cbeeac
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/encoding/match_generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,16 @@ impl MatchGenerator {
self.window_size -= removed.leaked_vec.data.len();
#[cfg(debug_assertions)]
self.concat_window.drain(0..removed.leaked_vec.data.len());
reuse_space(removed.leaked_vec);

let WindowEntry {
suffixes,
leaked_vec,
base_offset: _,
} = removed;
// Make sure all references into the leaked vec are gone
drop(suffixes);
// Then repurpose the vec
reuse_space(leaked_vec);
}
}
}
Expand Down

0 comments on commit 7cbeeac

Please sign in to comment.