Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

Program hangs on exit when using wxMultiChoiceDialog with wxSmith

<< < (2/2)

sodev:
I'm not familiar with wxSmith but why / how can you add a top-level element inside another top-level element? This shouldn't be possible at all, after all the dialog is not part of the layout of the frame but an individual element by itself.

And like oBFusCATed already said, these modal dialogs are not designed for a longer lifetime, they get created locally on the stack, you call their usually single method that returns a result and then they get deleted by the block scope. And all this happens inside user code and not the layout code created by a gui builder.

Miguel Gimenez:
The solution may be fixing them (thanks BlueHazzard), removing them if they have no sense or add a note in a "Known issues" section in the documentation. The memory leak is a minor problem, the hang on closing is.

They have little sense in wxSmith, but they are handy for one-frame small utilities. Other items strange in wxSmith are some in the Tools section: wxTimer, wxSingleInstanceChecker, wxStopWatch... In their case there is no problem with destruction, because they are not created in the heap.

Miguel Gimenez:
Created ticket 845

https://sourceforge.net/p/codeblocks/tickets/845/

Navigation

[0] Message Index

[*] Previous page

Go to full version