Results 1 to 9 of 9

Thread: Memory leak

  1. #1
    Join Date
    Jan 2006
    Location
    Ukraine,Lviv
    Posts
    454
    Thanks
    9
    Thanked 27 Times in 27 Posts
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Memory leak

    Windows XP Prof, Visual Studio, Qt 3.3.5

    When i run my app it take 8498K memory.Then when i minimize main window my app take 1036K and then if i maximize main window my app take only 3116K. Why not 8498K in the start ?
    a life without programming is like an empty bottle

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Memory leak

    And where's that memory leak?

  3. #3
    Join Date
    Jan 2006
    Location
    Ukraine,Lviv
    Posts
    454
    Thanks
    9
    Thanked 27 Times in 27 Posts
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: Memory leak

    Quote Originally Posted by jacek
    And where's that memory leak?
    sorry for my poor english but i think that you understand my question isnt it?
    a life without programming is like an empty bottle

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Memory leak

    Your application has freed 5MB of memory. Why do you call this a memory leak? If memory was leaking, its usage would increase.

  5. #5
    Join Date
    Jan 2006
    Location
    Ukraine, L'viv
    Posts
    57
    Thanks
    3
    Thanked 4 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Memory leak

    It's not memory leak but can somebody explain why it happens like said Zlatko.

  6. #6
    Join Date
    Jan 2006
    Location
    Ukraine,Lviv
    Posts
    454
    Thanks
    9
    Thanked 27 Times in 27 Posts
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: Memory leak

    I cant understand why app alloc this 5000K at the start? For what?
    a life without programming is like an empty bottle

  7. #7
    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: Memory leak

    It's your app, you should know If you want, you can use some memory checkers like valgrind, mpatrol and others to see where and when the memory is allocated and freed. It doesn't even have to be Qt doing that, it can be something connected with X11 or window manager used. It could also be that the memory is not freed but swaped out (if the values you reported here are about the physical memory usage).

  8. #8
    Join Date
    Jan 2006
    Location
    Ukraine,Lviv
    Posts
    454
    Thanks
    9
    Thanked 27 Times in 27 Posts
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: Memory leak

    Ok sorry guys its my carelessness it happdn for all programs runned under windows ..its interesting to know why..but its question not for this forum
    a life without programming is like an empty bottle

  9. #9
    Join Date
    Feb 2006
    Posts
    26
    Thanked 2 Times in 1 Post
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: Memory leak

    maybe it's due to some kind of buffer for graphic context or something like that...

Similar Threads

  1. Memory leak detection
    By Sid in forum Qt Programming
    Replies: 8
    Last Post: 4th May 2011, 22:38
  2. memory leak question
    By cool_qt in forum General Programming
    Replies: 3
    Last Post: 20th January 2009, 07:49
  3. Memory leak weirdness
    By Darhuuk in forum General Programming
    Replies: 10
    Last Post: 10th January 2008, 18:51
  4. QPixMap and Memory leak
    By Krish_ng in forum Qt Programming
    Replies: 1
    Last Post: 7th August 2007, 14:18
  5. Memory Leak in my Application :-(
    By Svaths in forum Qt Programming
    Replies: 4
    Last Post: 27th July 2007, 19:42

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.