[gtkmm] Memory leak



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello, i''m using Gtkmm and libglademm, 
I wrote a class named SSMT which controls the main window of program and it's 
a derived class, using get_derived_widget() from libglademm. This class has 
other member which are a derived classes too, for the dialog, look:

class SSMT : public Gtk::Window { 
....
About::About* m_about;
void on_about_activated();
...
}

The method on_about_activated is a callback used to present() the About 
dialog, which is another derived class as i said,

void SSMT::on_about_activated()
{
        if(!m_about)
        {
                m_refXml = Gnome::Glade::Xml::create("ssmt.glade","About");
                m_refXml->get_widget_derived("About",m_about);
                m_about->present();
        } else {
                m_about->present();
        }
}

That's ok, but i want to free the memory used in About dialog after the user 
close it, else, the m_about will refer to About while the main window is 
opened.. how can i do this?

Thank you in advanced.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBBqmmVXt+Digjni0RAhHcAJ4zP5/D85oChV3oKbDGeMbaQxHH0QCg1MAe
fcXWjpNmTf2Un8JS+XRNViE=
=6oeo
-----END PGP SIGNATURE-----



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