diff --git a/libcorpus2/io/reader.cpp b/libcorpus2/io/reader.cpp index 211a85af6032bfaeb78d47d3d106e6563c27e304..d1568875fe4f1259c92fb10c4f24c80bd62220a6 100644 --- a/libcorpus2/io/reader.cpp +++ b/libcorpus2/io/reader.cpp @@ -290,6 +290,7 @@ Token* BufferedSentenceReader::get_next_token() if (s) { std::copy(s->tokens().begin(), s->tokens().end(), std::back_inserter(token_buf_)); + s->release_tokens(); } else { more = false; }