Re: when we can delete a class derived from Gtk::Window or others
- From: Klaus <zfrdh web de>
- To: gtkmm-list gnome org
- Subject: Re: when we can delete a class derived from Gtk::Window or others
- Date: Fri, 18 Feb 2022 18:55:52 +0100
I tested you example and it works whenever the user closes the windows in the reverse
order from creation.
That it seems to work is known. The question is, is it the allowed way
to do this? If the Gtk::Window class performs more actions after hide()
and access data for the current class, the code has undefined behavior,
even if it works in the moment. I simply could not find any
documentation which gives me an idea what the window class perform on
close action.
BTW: Overriding the unrealize() function compiles ( override gives no
error message from the compiler ) but the function will never be called.
Nice bug! The signal handler manually connected via connect() works. Wow :-)
But, what happens if the user closes the parent window first?
All the given example is only a stupid example to give an idea what I
need to do. That in case of unordered closes something may hang is not
the problem. The question to answer is only for the current window and
delete. All interactions in the example code are not in focus here.
Thanks
Klaus
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]