Restarting application
chrismc911 at hotmail.com
chrismc911 at hotmail.com
Wed May 2 15:23:37 PDT 2007
Hi,
I have a situation where I need to restart my application when a major
system change has been recognized to make sure the new configuration
is used correctly in my app.
To do this, I have created a custom event and put a handler function
into my wxApp. There I try something like this:
- create a new wxFrame as placeholder and make it toplevel (such that
the app does not exit when I delete the main toplevel window)
- call Destory on the main window
- create the main windows again using 'new' and set it as toplevel
- delete the placeholder window
Unfortunately I get weird memory exceptions and the likes. I guess
this is because wxWindow::Destory does not directly destroy the
windows but rather remembers to delete it later in a idle phase to
make sure no events get send to a deleted window.
So I am somehow stuck on this and hope someone can tell me how
something I try can be accomplished in a clean way.
Thanks a lot,
Chris
More information about the wx-users
mailing list