0

I'm learning C++. When I call _run_file("otherapp.exe",""), current app's memory raise up 1MB. Is any memory leak here? If have, how to fix it? Thank you very much!

void _run_file(LPSTR file, LPSTR params)
{
    ShellExecute(NULL,NULL,file,params,NULL,NULL);
}
  • Really? You suspect the WinAPI of having such a blatant memory leak? Here's an easy test: call _run_file multiple times and see if the memory rises every time. Otherwise, it's probably just delay-loading some DLLs on the first call. – Sebastian Redl Apr 23 '13 at 16:00
  • @SebastianRedl: Fisrt time: 1MB, second: 0.2MB, third: 0.1 MB, after then: 0MB – user2310322 Apr 23 '13 at 16:03
  • 1
    @user2310322 Does that answer your question or do you still have a question? – Drew Dormann Apr 23 '13 at 16:33

0 Answers0