Skip to content

Commit

Permalink
Merge.cpp: To decrease startup time, call CleanupWMtemp() function in…
Browse files Browse the repository at this point in the history
… CMergeApp::ExitInstance() instead in CMergeApp:InitInstance().
  • Loading branch information
sdottaka committed Jul 9, 2017
1 parent 3b0f2ed commit a189563
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Src/Merge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,11 +287,6 @@ BOOL CMergeApp::InitInstance()
// Initialize temp folder
SetupTempPath();

// Cleanup left over tempfiles from previous instances.
// Normally this should not neet to do anything - but if for some reason
// WinMerge did not delete temp files this makes sure they are removed.
CleanupWMtemp();

// Parse command-line arguments.
MergeCmdLineInfo cmdInfo(GetCommandLine());

Expand Down Expand Up @@ -542,6 +537,12 @@ int CMergeApp::ExitInstance()
// Remove tempfolder
const String temp = env::GetTemporaryPath();
ClearTempfolder(temp);

// Cleanup left over tempfiles from previous instances.
// Normally this should not neet to do anything - but if for some reason
// WinMerge did not delete temp files this makes sure they are removed.
CleanupWMtemp();

delete m_mainThreadScripts;
CWinApp::ExitInstance();
return 0;
Expand Down

0 comments on commit a189563

Please sign in to comment.