Results 1 to 7 of 7

Thread: QSound Memory leak

  1. #1
    Join Date
    Mar 2014
    Posts
    3

    Default QSound Memory leak

    When uses QSound:lay(..)

    memory usages increase, and after playing, it decrase but, some of memory still remains.

    Any solution?

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

    That's probably not a memory leak. How are you measuring memory usage?
    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.


  3. #3
    Join Date
    Mar 2014
    Posts
    3

    Default Re: QSound Memory leak

    Thanks to reply.

    By Window Process Manager.

    for (int i = 0; i < 10000; i ++) {
    QSound *sound = new QSound("file");
    delete sound;
    (Or QSound:lay("file")
    }

    result :: About 8,000K~9,000K memory incrase and never decrase.

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

    Windows Process Manager is not an accurate tool to measure memory usage
    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.


  5. #5
    Join Date
    Mar 2014
    Posts
    3

    Default Re: QSound Memory leak

    That means, actually there's no memory leak after done and Windows Process Manager's memory usage is something like 'delusion'?

    If then, how to measure usage properly?

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

    You'd have to use tools dedicated for tracing memory leaks.
    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.


  7. #7
    Join Date
    May 2011
    Posts
    6
    Qt products
    Qt3
    Platforms
    MacOS X

    Default Re: QSound Memory leak

    I'm using "Visual Leak Detector" for Visual Studio. VLD is open source and works fine!
    Is surly better than watch the process manager

    http://vld.codeplex.com/

    A simple include in main.cpp is all you have to do. Every memory leak will be visible...

    #ifdef _DEBUG
    #define _ENABLE_VISUAL_LEAK_DETECTOR
    #endif // _DEBUG
    #ifdef _ENABLE_VISUAL_LEAK_DETECTOR
    #include "vld.h"
    #endif // _ENABLE_VISUAL_LEAK_DETECTOR

Similar Threads

  1. Qt & Memory Leak
    By fanoI in forum Qt Programming
    Replies: 7
    Last Post: 31st October 2013, 08:53
  2. memory leak in qml
    By jindoniit in forum Qt Quick
    Replies: 6
    Last Post: 26th September 2011, 10:16
  3. Qt example with memory leak
    By Squall in forum Qt Programming
    Replies: 5
    Last Post: 21st February 2011, 10:07
  4. memory leak
    By mattia in forum Newbie
    Replies: 18
    Last Post: 16th January 2008, 10:22
  5. Memory leak?
    By Enygma in forum Qt Programming
    Replies: 10
    Last Post: 4th September 2007, 16:24

Tags for this Thread

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.