Skip to content

Commit

Permalink
use make_shared to create singleton
Browse files Browse the repository at this point in the history
  • Loading branch information
oraluben authored Oct 18, 2024
1 parent eb1713f commit d77f747
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libkineto/src/CuptiCallbackApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@ void CuptiCallbackApi::__callback_switchboard(

std::shared_ptr<CuptiCallbackApi> CuptiCallbackApi::singleton() {
static const std::shared_ptr<CuptiCallbackApi> instance = [] {
std::shared_ptr<CuptiCallbackApi> inst =
std::shared_ptr<CuptiCallbackApi>(new CuptiCallbackApi());
std::shared_ptr<CuptiCallbackApi> inst = std::make_shared<CuptiCallbackApi>();
return inst;
}();
return instance;
Expand Down

0 comments on commit d77f747

Please sign in to comment.