Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Light-City authored Apr 3, 2021
1 parent ea416ee commit ffa2f33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion design_pattern/singleton/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ singleton *instance() {
lock_guard<mutex> guard(lock_);
if (p == nullptr) {
singleton *tmp = static_cast<singleton *>(operator new(sizeof(singleton)));
new(p)singleton();
new(tmp)singleton();
p = tmp;
}
}
Expand Down

0 comments on commit ffa2f33

Please sign in to comment.