jbe
March 21, 2023, 6:41pm
9
I think whether or not such kind of cases (I haven't looked at your particular case ) can be considered "memory leaks" is at least arguable, in my opinion.
From another thread:
My point is: when we speak of memory leaks, we almost always think on leaks where memory becomes unreachable. But there is also the more general case of leaks by logic errors. These can make you lose megabytes or gigabytes of memory as well.
[…]
Another example for a non-explicit memory leak, which neither involves Rc
or Arc
: […] (Playground )
If you push two values into result_tx
but only read one value from result_rx
, and if you repeat this over a long time, you will leak memory. This is similar to my original example of growing a String
further and further, except it's an mpsc
queue which grows here.