Re: memory leaks - pixbuf
- From: Mark Roberts <gtkmm manumark de>
- To: Marcel Claro <marcelnmetal gmail com>
- Cc: gtkmm-list gnome org
- Subject: Re: memory leaks - pixbuf
- Date: Tue, 26 May 2009 12:17:09 +0200 (CEST)
Dear Marcel!
> ImageWindow::ImageWindow(string imagepath){
> Glib::RefPtr<Gnome::Glade::Xml> Widgetstree =
> Gnome::Glade::Xml::create("interface2.glade");
>
> Widgetstree->get_widget("imagewindow", imagewindow);
> Widgetstree->get_widget("image", image);
The Tutorial at
http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/sec-libglademm-accessing-widgets.html
explains that you need to call delete on top level widgets you receive
from Gnome::Glade::Xml::get_widget(). This applies to your imagewindow.
The tutorial fails to explain what happens to a top level widget if I
don't call get_widget() for it. The class reference for Gnome::Glade::Xml
is also hardly helpful. Any comments, list?
Best wishes,
Mark
---------------------------------------------------------------
Mark Roberts, hardcore C++-Programmierer, Musiker, Schauspieler
05121 511455
www.rapid-arts-movement.de
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]