Skip to content

Commit

Permalink
Add step to release memory
Browse files Browse the repository at this point in the history
  • Loading branch information
asonix committed Nov 4, 2024
1 parent ca67ea4 commit b3c5934
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions actix-ws/src/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit b3c5934

Please sign in to comment.