Closed daixtrose closed 4 years ago
Hi Markus!
I was able to repro this with the code you gave.
The short answer is that this is not a memory leak. The thread join still leaves work running in rxcpp. That work will complete and release the resources in time (I tried adding a sleep_for(5s) and did not see asan failures)
The long answer is that I have been trying to find a way to compose the rxcpp signals to get a reliable end-of-work signal. I have not been successful yet.
The longer answer is that we are doing a lot of work trying to define structured concurrency to eliminate these issues in lib unifex. operations will have a way to signal that the state has been torn down.
I can confirm that a release version running for several minutes does not change its memory footprint. So this issue can be closed, but it will enter my collection of things that nearly killed me.
Sorry about that, thanks for confirming. And sorry about the pain.
compile with
g++-9 (Ubuntu 9.2.1-17ubuntu1~18.04.1) 9.2.1 20191102
Let the test run several times, at some point in time you will obtain a leak detection, see output.txt