Re: Gtk::Widget::destory() ?



On Mon, 2006-10-09 at 23:10 -0500, Nickolai Dobrynin wrote:
> So, assume the following scenario.  I send the delete signal to the
> window by clicking on the X.
> By default, this should get the window destroyed, correct?

No, the "destroy_event" signal is badly named. It is a request to close
the window. It says nothing about the memory management of the objects
in your application.

>   If the way I initially allocated the window
> was by using the 'new' operator, would "destroy", in this particular
> context mean that the C++
> pointer has been invalidated, as well, just like the underlying GTK+
> instance?

No.

http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/ch22.html

[snip]

>         ...which means that the documentation that Maik brought up at
>         the
>         beginning of this thread should really be changed so that it
>         doesn't
>         mention anything about Gtk::Widget::Destroy() (which doesn't
>         exist) 
>         but instead tell people to 'delete' the widget in the normal C
>         ++ way.


-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




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