mirror of
https://github.com/Artikash/Textractor.git
synced 2024-12-23 17:04:12 +08:00
cap memory usage
This commit is contained in:
parent
2f7365acbd
commit
49e915c3b6
@ -55,6 +55,8 @@ void TextThread::Push(BYTE* data, int length)
|
|||||||
|
|
||||||
void TextThread::Flush()
|
void TextThread::Flush()
|
||||||
{
|
{
|
||||||
|
if (storage->size() > 10'000'000) storage->erase(0, 8'000'000); // https://github.com/Artikash/Textractor/issues/127#issuecomment-486882983
|
||||||
|
|
||||||
std::vector<std::wstring> sentences;
|
std::vector<std::wstring> sentences;
|
||||||
queuedSentences->swap(sentences);
|
queuedSentences->swap(sentences);
|
||||||
for (auto& sentence : sentences)
|
for (auto& sentence : sentences)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user