View Full Version : Recreating MainWindow

22nd September 2011, 21:51
I have a gui which is cyclic in execution(ie. it runs from Step1 to step n & starts over again). I have noticed that it kinda slows down after a few cycles. I was wondering is there anyway to destroy & recreate the mainWindow at the end of every cycle, so that it will speed up the execution on the longrun.

Thank You.


22nd September 2011, 22:04
If is slows down, you most likely have an error in your code, that you do not clean properly. Or something like that... Have you profiled your application? Does the memory grow?

22nd September 2011, 22:22
sounds like you have a memory leak(s). fix the leaks...

22nd September 2011, 23:23
I had labels stacked on top of each other & show/hide at various stages of the program. Thats what mainly slows it down. Now i have started reprogramming the whole thing using Stacked widgets. That should solve the problem. What i'm asking right now is just a temprorary fix till i finish the program. Is recreating the mainwindow possible?