When uses QSound:lay(..)
memory usages increase, and after playing, it decrase but, some of memory still remains.
Any solution?
When uses QSound:lay(..)
memory usages increase, and after playing, it decrase but, some of memory still remains.
Any solution?
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.
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?
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
Bookmarks