I have a program that reads a queue (FIFO), save (.push_back) in a list in memory (std:: list) and a thread that read this queue(.front) after clean (.pop_front, .clean).
The problem is the std::list will not release the memory used. Any tips?
If you are storing pointers in the list, then no, std::list does not delete the pointers. Use boost::ptr_list<> instead.
Otherwise std::list manages the memory it uses.
And by the way, neither std::list nor boost::ptr_list are threadsafe, so you will need to provide appropriate
synchronization.