Results 1 to 5 of 5

Thread: Resetting rows in Table causes memory leak leading to crash

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: Resetting rows in Table causes memory leak leading to crash

    There are couple of things in your code which may cause you problems, (may not be the problem which you see now)

    1. Disable sorting (if enabled) on the QTableWidget when inserting rows, and enable back when insertion and item setting is done.
    2. There is no check on m (detstatsList.size()) for it to be multiple of 4 (a row with few empty columns)

  2. The following user says thank you to Santosh Reddy for this useful post:

    deepakn (22nd July 2011)

  3. #2
    Join Date
    Jun 2007
    Location
    India
    Posts
    33
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Resetting rows in Table causes memory leak leading to crash

    Hi Santhosh,

    Thanks for the response. We found that the particular segment of code is not the one causing segfault. But I was able to find out many issues in the code even though they were not direct troublemakers, thanks to you and high_flyer. Most parts of this were written years ago when i was starting out with Qt and I guess I will have to do a detailed review now.
    Design is easy. All you do is stare at the screen until drops of blood form on your forehead.
    -Marty Neumeier

Similar Threads

  1. Qt example with memory leak
    By Squall in forum Qt Programming
    Replies: 5
    Last Post: 21st February 2011, 10:07
  2. Memory leak
    By yxtx1984 in forum Qt Programming
    Replies: 4
    Last Post: 26th February 2010, 11:13
  3. Qt dll + memory leak
    By Fastman in forum Qt Programming
    Replies: 3
    Last Post: 2nd August 2009, 13:28
  4. Memory Leak in Qt
    By Krish_ng in forum Qt Programming
    Replies: 3
    Last Post: 22nd July 2007, 08:02
  5. Memory leak
    By zlatko in forum Qt Programming
    Replies: 8
    Last Post: 28th March 2006, 19:02

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.