Skip to content

Commit

Permalink
Fix memory leak when another instance is running (#321)
Browse files Browse the repository at this point in the history
The instance_checker as a wxSingleInstanceChecker class
instance shall be destroyed before exiting the program.
This is in compliance with the class reference.

Memory leak found with the AddressSanitizer bundled with
Clang.
  • Loading branch information
tobiolo authored Dec 21, 2022
1 parent 63fdfaf commit de21ad9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/myapp.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ struct MyApp : wxApp {
client.MakeConnection(
L"localhost", L"4242",
filename.Len() ? filename.wc_str() : L"*"); // fire and forget
DELETEP(instance_checker);
return false;
}
}
Expand Down

0 comments on commit de21ad9

Please sign in to comment.