FLTK logo

Re: [fltk.general] Popup window distructor not being called

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Popup window distructor not being called Ian MacArthur Nov 24, 2020  
 
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 ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.