C++/VS2005/WinAPI: утечка памяти для самых маленьких

0000

Как проверить свою прогу на наличие утечек? Желательно как нить попроще.

Maurog

почитать мсдн
The ability to dynamically allocate and deallocate memory is one of the strongest features of C/C++ programming, but the greatest strength can also be the greatest weakness. This is certainly true of C/C++ applications, where memory-handling problems are among the most common bugs.
One of the most subtle and hard-to-detect bugs is the memory leak — the failure to properly deallocate memory that was previously allocated. A small memory leak that occurs only once may not be noticed, but programs that leak large amounts of memory, or leak progressively, may display symptoms ranging from poor (and gradually decreasing) performance to running out of memory completely. Worse, a leaking program may use up so much memory that it causes another program to fail, leaving the user with no clue to where the problem truly lies. In addition, even harmless memory leaks may be symptomatic of other problems.
Fortunately, the Visual Studio debugger and C run-time (CRT) libraries provide you with effective means for detecting and identifying memory leaks. To understand how to detect memory leaks using the CRT debugging facilities, read the following topics:
Enabling Memory Leak Detection
Interpreting Memory Block Types
Setting a Breakpoint on a Memory Allocation Number
Comparing Memory States
MFC provides its own set of facilities for detecting memory leaks in MFC programs. For more information, see Detecting Memory Leaks in MFC.

искать слова "detecting memory leaks" или "_CrtDumpMemoryLeaks function" в мсдн
ps: purify хорошая прога

0000

Псиб. С трудом осилил английский текст и понял, что там ничего нет :(
Прогу буду смотреть :)

evgen5555

Поставить BoundsChecker.
Оставить комментарий
Имя или ник:
Комментарий: