Results 1 to 2 of 2

Thread: Timer call

  1. #1
    Join Date
    Jan 2006
    Posts
    80
    Thanks
    1
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Timer call

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Timer call

    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.

Similar Threads

  1. QSqlQuery and seek() - doesn't work on first call.
    By amicitas in forum Qt Programming
    Replies: 1
    Last Post: 2nd October 2008, 18:25
  2. what if qthread call same slot at the same time?
    By zl2k in forum Qt Programming
    Replies: 2
    Last Post: 11th September 2008, 10:58
  3. how to enable a timer in a non-gui thread?
    By zeopha in forum Qt Programming
    Replies: 3
    Last Post: 5th August 2008, 10:29
  4. Replies: 1
    Last Post: 28th May 2008, 17:52
  5. How and when to repaint a widget ?
    By yellowmat in forum Newbie
    Replies: 7
    Last Post: 3rd April 2006, 17:36

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.