h2 icon indicating copy to clipboard operation
h2 copied to clipboard

Mem leak when releasing stream

Open LYF1999 opened this issue 3 years ago • 3 comments

https://github.com/hyperium/h2/blob/756384f4cdd62bce3af7aa53a156ba2cc557b5ec/src/proto/streams/counts.rs#L164-L168

There may still leave some bytes releated to the stream in https://github.com/hyperium/h2/blob/756384f4cdd62bce3af7aa53a156ba2cc557b5ec/src/proto/streams/recv.rs#L52 when Counts remove a closed Stream. This may cause mem leak, Should we remove bytes releated to the stream in remove function?

LYF1999 avatar Aug 01 '22 10:08 LYF1999

I am gald to submit a PR to fix that, but we can not access Recv in Counts. if we do that, it will be a large change commit.

LYF1999 avatar Aug 01 '22 10:08 LYF1999

@seanmonstar can we have a look?

Millione avatar Aug 09 '22 15:08 Millione

Sure!

seanmonstar avatar Aug 09 '22 15:08 seanmonstar