Home > Back-end >  Help exe running a memory leak
Help exe running a memory leak

Time:03-12

Company has developed a software, the environment is VS2017, programming language is c + +, using code to run is normal, no memory leaks, use exe running, running on the computer when someone else is no problem, and then let the colleagues the whole pack executable file to send me, on my computer is running exe will appear again when a memory leak, help bosses what's this? Related to computer configuration environment? Now with my colleagues on the firewall is shut down

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 leak

CodePudding 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 leaks

CodePudding user response:

Windows patch

One 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!
  • Related