Created
April 3, 2020 03:22
-
-
Save vinniefalco/254e35c6212c948872af7d2e1dbe5c93 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inline | |
void | |
addref() const noexcept | |
{ | |
//if(p_ && p_->counted_) | |
if(i_ & 1) | |
addref2(); | |
} | |
inline | |
void | |
release2() const noexcept | |
{ | |
auto p = get(); | |
if(--p->refs_ == 0) | |
delete p; | |
} | |
inline | |
void | |
release() const noexcept | |
{ | |
if(i_ & 1) | |
release2(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment