I'm storing std::shared_ptr inside buffered_channel:
using DataSPtr = std::shared_ptr<const Msg>;
using Channel = boost::fibers::buffered_channel<DataSPtr>;
Then using range-for loop to consume values:
Channel ch(1024);
...
for (const auto msgSPtr : ch)
{
...
}
This code leads to constantly memory leaks. The workaround with while(true) & pop_value works just fine.
I'm storing std::shared_ptr inside buffered_channel:
Then using range-for loop to consume values:
This code leads to constantly memory leaks. The workaround with
while(true) & pop_valueworks just fine.