Skip to content

Commit

Permalink
Merge pull request #316 from kngwyu/arraylist-fix
Browse files Browse the repository at this point in the history
Fix memory leak in ArrayList
  • Loading branch information
konstin authored Dec 28, 2018
2 parents b9f9580 + bbfe79f commit 3225941
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pythonrun.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ mod array_list {
pub fn pop_back(&mut self) -> Option<T> {
self.length -= 1;
let current_idx = self.next_idx();
if self.length >= BLOCK_SIZE && current_idx == 0 {
if current_idx == 0 {
let last_list = self.inner.pop_back()?;
return Some(last_list[0].clone());
}
Expand Down

0 comments on commit 3225941

Please sign in to comment.