Results 1 to 19 of 19

Thread: memory leak

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2007
    Location
    Italy
    Posts
    172
    Thanks
    39
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default memory leak

    Hello, i'trying to understund why running my app with
    Qt Code:
    1. valgrind --tool=memcheck --leak-check=yes -v /my/app
    To copy to clipboard, switch view to plain text mode 
    i get a sort of memory leak
    Qt Code:
    1. 132 (4 direct, 128 indirect) bytes in 1 blocks are definitely lost in loss record 20 of 163
    To copy to clipboard, switch view to plain text mode 
    up here it just a little piece ....
    I'm using the "direct approach", what should i do to prevent it?
    It looks like when i call a function into my class in this way
    Qt Code:
    1. parent_object->myFunc()
    To copy to clipboard, switch view to plain text mode 
    i earn a leak....

    ----------------- edit -----------------
    to be more accurate my leak summury:
    Qt Code:
    1. ==3325== LEAK SUMMARY:
    2. ==3325== definitely lost: 708 bytes in 77 blocks.
    3. ==3325== indirectly lost: 22729 bytes in 420 blocks.
    4. ==3325== possibly lost: 0 bytes in 0 blocks.
    5. ==3325== still reachable: 728510 bytes in 26553 blocks.
    6. ==3325== suppressed: 0 bytes in 0 blocks.
    7. ==3325== Reachable blocks (those to which a pointer was found) are not shown.
    8. ==3325== To see them, rerun with: --show-reachable=yes
    9. --3325-- TT/TC: 0 tc sectors discarded.
    10. --3325-- 180208 tt_fast misses.
    11. --3325-- translate: new 89667 (1628736 -> 24489134; ratio 150:10)
    12. --3325-- discard 190 (2620 -> 35740; ratio 136:10).
    13. --3325-- chainings: 71514 chainings, 0 unchainings.
    14. --3325-- dispatch: 98933412 jumps (bb entries); of them 16549827 (16%) unchained.
    15. --3325-- 1979/607625 major/minor sched events.
    16. --3325-- reg-alloc: 15989 t-req-spill, 4351425+95101 orig+spill uis,
    17. --3325-- 484044 total-reg-rank
    18. --3325-- sanity: 1980 cheap, 80 expensive checks.
    19. --3325-- ccalls: 547959 C calls, 54% saves+restores avoided (1744510 bytes)
    20. --3325-- 726410 args, avg 0.90 setup instrs each (138758 bytes)
    21. --3325-- 0% clear the stack (1643130 bytes)
    22. --3325-- 156831 retvals, 34% of reg-reg movs avoided (103722 bytes)
    To copy to clipboard, switch view to plain text mode 
    Last edited by mattia; 8th January 2008 at 15:31.

Similar Threads

  1. Memory leak detection
    By Sid in forum Qt Programming
    Replies: 8
    Last Post: 4th May 2011, 22:38
  2. Memory leak?
    By Enygma in forum Qt Programming
    Replies: 10
    Last Post: 4th September 2007, 16:24
  3. QPixMap and Memory leak
    By Krish_ng in forum Qt Programming
    Replies: 1
    Last Post: 7th August 2007, 14:18
  4. Memory Leak in my Application :-(
    By Svaths in forum Qt Programming
    Replies: 4
    Last Post: 27th July 2007, 19:42
  5. Qt 4.1 Memory Leak
    By blackliteon in forum Qt Programming
    Replies: 14
    Last Post: 10th February 2006, 12:47

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.