|
|
On 24 Nov 2020, at 17:31, david allen wrote:
>
> My impression is that clicking X in the title bar executes the window's destructor, but that does not seem to be the case for a popup window. In the attached demo the intent is for clicking the X has the same effect as clicking the close button. It appears that the destructor is never called.
Generally speaking, when fltk hides a window, it does not really destroy it per se - and clicking the X in the title bar mostly just hides the window, many of it’s “aspects” are retained... Until the application closes, when the memory is then reaped of course.
That’s not necessarily a bad thing though - pop-up windows are often things like menus or dialogs or etc., that are liable to be re-shown again later, so sort of keeping them around in the background is generally a good idea.
Is there some specific reason you need the destructor to run when the pop-up is removed?
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/D5A7A368-0CB8-458C-9530-C611FBDDB377%40gmail.com.
[ Direct Link to Message ] | |
|
| |