Results 1 to 6 of 6

Thread: Let me know your valid suggession for Memory Leak ..!!!

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2006
    Posts
    157
    Qt products
    Qt3 Qt4
    Thanks
    12
    Thanked 1 Time in 1 Post

    Default Re: Let me know your valid suggession for Memory Leak ..!!!

    So i need not be worried of the MEMORY LEAK....
    I did not mean that Qt will break the promises, instead just want to know your suggessions as you people are more experienced than me.

    Thank you wysota

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

    Default Re: Let me know your valid suggession for Memory Leak ..!!!

    It's written in the docs more than a dozen times that Qt takes responsibility over items which have a parent set.

  3. #3
    Join Date
    Jan 2006
    Location
    Kerala
    Posts
    371
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    76
    Thanked 37 Times in 32 Posts

    Default Re: Let me know your valid suggession for Memory Leak ..!!!

    And to add to what wysota had said
    It is a good practice to create that QTable on heap rather than declare it as QTable table;
    We can't solve problems by using the same kind of thinking we used when we created them

  4. #4
    Join Date
    Feb 2006
    Posts
    157
    Qt products
    Qt3 Qt4
    Thanks
    12
    Thanked 1 Time in 1 Post

    Default Re: Let me know your valid suggession for Memory Leak ..!!!

    sunil,

    Actually m_table is in heap itself .Its my mistake that i didn't mentioned like this..

    Qt Code:
    1. class MyMainWindow : QMainWindow
    2. {
    3. -------
    4. --------
    5.  
    6. public :
    7. QTable * m_table ;
    8.  
    9.  
    10. };
    To copy to clipboard, switch view to plain text mode 

    In runtime i will call this as follows...
    Qt Code:
    1. // m_table will be lively when the MyMainWindow is beeing created.
    2. m_table = new Qtable( ...,... );
    To copy to clipboard, switch view to plain text mode 




    As Wysota told got the solution ,like m_table will be killed by the MyMainWindow , just before it's beeing killed

    Thank you sunil.
    Last edited by jacek; 12th December 2006 at 11:31. Reason: changed [html] to [code]

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
  •  
Qt is a trademark of The Qt Company.