Detected memory leaks

前端 未结 5 1729
天涯浪人
天涯浪人 2021-01-30 18:32

In my wxWidgets application, while running in debug mode i got this message in Output of Visual Studio 2010. The application ran fine, and i only saw this after closing it.

5条回答
  •  执念已碎
    2021-01-30 19:19

    1. Never just 'assume' that your code is memory leak proof. Unless you are one of the programming demi-gods, no one is immune from possibly writing memory leaks.

    2. You could use a tool like bounds checker (From Microfocus) to help identify the memory leak because it will give you a callstack. The memory leak report you got from the debug CRT just tells you memory leaked at a particular address. A product like bounds checker will give you a callstack for that memory leak, along with lots of other goodies. There are other memory leak tools out there in the market, but I won't attempt to list them here.

    3. If you are sure the memory leak is due to 'wxWidgets', then perhaps you should inform the writers of that library and perhaps they will fix it (With suitable repro steps).

提交回复
热议问题