PDA

View Full Version : Timer call



mahe2310
28th March 2006, 08:18
Hi,

My application holds a timer that calls a function abc() which makes it to propagate to another window.
And similar in the case of the newly created window.

I wants to know whether the function called will remain in the stack even after we move to next window?
If so, there exists a memory leak and hence lead to m/y overflow.

Plz comment on this?

Mahe2310

wysota
28th March 2006, 08:57
If you created it on stack, it'll be removed when the scope where it was declared ends. If you created it on heap, you should pass a pointer to a parent object (any QObject descendant or QObject itself), then it'll get destroyed when that parent object gets destroyed.