1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-03-15 18:03:06 +01:00

Add step to release memory

This commit is contained in:
asonix 2024-11-04 17:52:07 -06:00
parent ca67ea4faa
commit b3c5934b00

View File

@ -140,6 +140,10 @@ impl Stream for StreamingBody {
return Poll::Ready(None);
}
// When we have a moment (pending) allow the BigBytes to release memory
// arbitrary 8KB (page size)
this.buf.clear(1024 * 8);
Poll::Pending
}
}