[Qt-interest] How to detect memory leaks

Johnson Ma johnson.ma01 at gmail.com
Mon Jul 12 11:07:34 CEST 2010


I think you can use _CrtMemCheckpoint, _CrtMemDifference to detect memory
leak on Windows.

For Linux, since there is no similar API to do the heap check, you can use
Valgrind (VALGRIND_COUNT_LEAKS)

Regards

Johnson




On Mon, Jul 12, 2010 at 4:46 PM, Santhosh Y <santhosh at softjin.com> wrote:

>  Hi,
>
> How to see memory leaks in my Qt application. Would like to know the amount
> of memory leak in my application.
>
> I am working on Windows OS,  using
>
> 1. Microsoft Visual Studio 2008
>     Version 9.0.21022.8 RTM
>     Microsoft .NET Framework
>     Version 3.5 SP1
> 2. Qt 4.5.2 version
>
>  1. Any idea of how to run purify for a Qt application.
> 2. Any flags to be added to the project file / Visual studio for detecting
> memory leaks?
>
> Thanks in advance.
>
> Regards,
> Santhosh
>
> --
> ----------------------------------------------------
> Y Santhosh Kumar -
> Senior Software Engineer,
> SoftJin Technologies Pvt Ltd,www.softjin.com
> ----------------------------------------------------
>
> Business Disclaimer
> ____________________________________________________________
> This e-mail message and any files transmitted with it are intended solely
> for  the use  of the  individual or entity  to which they  are  addressed. It
> may  contain confidential,  proprietary or legally  privileged  information.
> If  you  are  not  the  intended recipient please be advised that you have
> received  this  message in error and any use is strictly prohibited. Please
> immediately  delete it  and all copies of it from your system, destroy any
> hard  copies  of  it and  notify  the  sender  by return mail. You must not,
> directly or indirectly, use,  disclose,  distribute, print, or copy any part of
> this message if you are not the intended recipient.
> ___________________________________________________________
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>


-- 
Johnson Ma
____________________________
Keep it simple, stupid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100712/17935fbf/attachment.html 


More information about the Qt-interest-old mailing list