CodePudding user response:
In others the execution of logic and computer are consistent on your computer? Is it because the code flow path lead to different hidden problem?CodePudding user response:
Not because code logic itself code running time is no problem, I am all deleted, to download code, executable file was generated for my colleagues, so doubt will associated with the system environment on the computer, such as the use of the computer or the installation of other software changed some computer system variables, the registry of what, so I want to turn my computer system configuration environment will cause only exe runtime memory leakCodePudding user response:
Send you, the Debug version of VS remote debugging, running process, the memory leak is suspected, the end of the application of v on the output information, you can see the memory leaks, then at the start of the code, plus _CrtSetBreakAlloc, compilation, debugging again, can know is that piece of memory leaksCodePudding user response:
Windows patchOne way to check whether resource leaks:
In the process of the task manager to see inside the column selection: memory, virtual memory size, handle number, number of threads, the USER object, GDI objects
Make your program (process) don't quit, cycle through main process many times, the more the better, like 1000000 times or even an infinite loop, record the above numerical, it through at least one hour, as long as possible, such as a month, to record more than the value, if the above two groups of numerical differential is bigger or increasing over time, will certainly have a corresponding resources resource leaks!