I'm working on a program to do multiple Simulations and determine the optimal settings, related to measured data.
I use the gtkmm toolkit for a GUI and glibmm for multithread support.
For this purpose I have a an object named SimulationCCD.
I initialize this object and run it using run_simulation(), like this:
for (unsigned i=0;i<10000;i++)
SimulationCCD simccd(...some parameters here...);
Now if I run
memory usage is low as expected: The SimulationCCD object is destructed after every single run.
A completely different thing happens if I run the function in a thread like this
Glib::Thread* m_sim_thread=Glib::Thread::create(sigc::mem_fun(*this, &Regression::run_sims), true);
This code results in increased memory usage. In this case it looks like the SimulationCCD objects are not destroyed.
The memory usage of the program just increases unchecked.
Has anyone experienced this problem using glibbm threads and are there any known solutions? (preferably using the glibmm or glib toolkit)
Hugo van den Brand