XML parser results: clears the temporary data buffer while parsing

Avoids indefinitely increasing memory consumption
pull/409/head
Tpt 2 years ago committed by Thomas Tanon
parent 6d09d77c61
commit 42cd6b0094
  1. 2
      lib/sparesults/src/xml.rs

@ -260,6 +260,7 @@ impl<R: BufRead> XmlQueryResultsReader<R> {
Event::Eof => return Err(SyntaxError::msg("Unexpected early file end. All results file should have a <head> and a <result> or <boolean> tag").into()),
_ => (),
}
buffer.clear();
}
}
}
@ -533,6 +534,7 @@ impl<R: BufRead> XmlSolutionsReader<R> {
Event::Eof => return Ok(None),
_ => (),
}
self.buffer.clear();
}
}
}

Loading…
Cancel
Save