The first VLD-memory leak detection tool, with a small emotion

Source: Internet
Author: User


Even if thousands of troops and horses can be squandered, they are not as easy as being alone.

I always thinkSince giving up BaiduAfter csdn,If you write some technology or have some experiences, you will always be less comfortable,One of the reasons for this analysis is that we have been working in large companies for a long time. There are many things that follow the rules.There is nothing new to explore. Second, I have always been a bit sad, so easy.Or study something that is too superficial, even if you are ashamed to get stuck on this hot technology.

Some time ago,Check your ownAlgorithmLibrary (of course, some of which were previously written by companies), memory leakage,Because inReleaseThe most traditional version, After executionUseWindows Task Manager(Windows
Task Manager)Check whether memory increases after execution. Then go throughCode.

After a few K is left, I cannot find out where it is. My colleague recommended this VLD tool. YesvisuAl leak detecotOr.

Only if all the memory check tools are for dubUg version, and thisYeswind32Program.

Easy to use,

Download a visual leak detector toolkit.

The program dynamically loads VLD. Lib. Then, inlude VLD. H file.

 
# Include "C: \ Program Files (x86) \ visual leak detector \ include \ VLD. H "# pragma comment (Lib," C: \ Program Files (x86) \ visual leak detector \ Lib \ Win32 \ VLD. lib ") int _ tmain (INT argc, _ tchar * argv []) {int ntestnum = 5;......

// Cfastreg. cpp # include "C: \ Program Files (x86) \ visual leak detector \ include \ VLD. H"

After execution, if memory leakage occurs, the leaked file line number and call stack will be output on the console.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.