Results 1 to 13 of 13

Thread: QPixmap memory leak problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2010
    Posts
    86
    Thanks
    11
    Thanked 7 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default QPixmap memory leak problem

    Ok so I wrote an application that I call Image Grabber in Windows 7.
    It goes and grabs some weather doppler picture every 15 minutes, and saves it with a name having a unique date/time string...
    It works fine, so I added it to do 6 images every 15 minutes. But eventually it crashes because of a memory leak.

    A few other descriptions.
    -It gets the image by using the filedownloader class. (QUrl with a slot that executes after finished download)
    -I am running it from the icon tray with 4 QIcon's that replace on a timer.
    -It saves the images to the hard drive and also there is a QWidgetStack that has 6 divisions, with each one displaying the QPixmap in a QLabel.

    my question is this memory problem to do the
    QPixmaps themselves?
    or possibly setting the QLabel QPixmap?
    or even possibly the filedownloader class?
    will QPixmapCache solve this?

    for a work around, I could write another application that calls the original one once every 15 minutes and it closes after the last file saved, therefore insuring that there is no memory leak, but I shouldn't have to do that.

    any help would be awesome.

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

    Default Re: QPixmap memory leak problem

    The problem is in your code.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 1
    Last Post: 16th December 2009, 07:01
  2. Qt dll + memory leak
    By Fastman in forum Qt Programming
    Replies: 3
    Last Post: 2nd August 2009, 13:28
  3. QPixmap: X11 "memory leak" due to shared pixmap data?
    By chezifresh in forum Qt Programming
    Replies: 0
    Last Post: 21st April 2009, 19:53
  4. QPixMap and Memory leak
    By Krish_ng in forum Qt Programming
    Replies: 1
    Last Post: 7th August 2007, 14:18
  5. Memory leak
    By vvbkumar in forum General Programming
    Replies: 4
    Last Post: 2nd September 2006, 15:31

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.