PDA

View Full Version : Recreating MainWindow



premroxx
22nd September 2011, 20:51
Hello,
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.

Prem.

Lykurg
22nd September 2011, 21: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?

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

premroxx
22nd September 2011, 22: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?