[gtkmm] Memory Leak?



I'm trying to do some memory management tests.
So, I started with the HelloWorld example, modifying the on_button_clicked() method with the purpose of make a loop that shows and hides the button continuously.
I think I'm forgetting something, because the memory leak is huge.
Both window and button are static objects. There are no pointer constructions.
Maybe the show() and hide() methods are doing something I don't know.
I also probed it into gtk2+ and the problem persists. Though, it's clear the wrapper is not the cause.
What could be happening or what am I doing wrong?

void HelloWorld::on_button_clicked()
{
   while (1)
   {
      m_button.hide();
      m_button.show();
   }
}

Thanks
César





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]