diff options
author | gulin <gulin@yandex-team.ru> | 2022-02-10 16:47:32 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:32 +0300 |
commit | 7199613d295246a07c2f7b331fbb3128936039dc (patch) | |
tree | c0748b5dcbade83af788c0abfa89c0383d6b779c /util/ysafeptr.cpp | |
parent | c807aae441c17fc7f577c35757a4b6e0bd909802 (diff) | |
download | ydb-7199613d295246a07c2f7b331fbb3128936039dc.tar.gz |
Restoring authorship annotation for <gulin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/ysafeptr.cpp')
-rw-r--r-- | util/ysafeptr.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/util/ysafeptr.cpp b/util/ysafeptr.cpp index de00b6d8f0..96f2514067 100644 --- a/util/ysafeptr.cpp +++ b/util/ysafeptr.cpp @@ -1,33 +1,33 @@ #include "ysafeptr.h" -#ifdef CHECK_YPTR2 +#ifdef CHECK_YPTR2 Y_POD_THREAD(bool) IObjectBase::DisableThreadCheck; -#endif -//////////////////////////////////////////////////////////////////////////////////////////////////// +#endif +//////////////////////////////////////////////////////////////////////////////////////////////////// void IObjectBase::ReleaseObjComplete(int nMask) { - if ((ObjData & 0x3fffffff) == 0 && RefData == 0) { - assert((ObjData & 0x40000000) == 0); // object not being invalidated + if ((ObjData & 0x3fffffff) == 0 && RefData == 0) { + assert((ObjData & 0x40000000) == 0); // object not being invalidated delete this; - } else if ((ObjData & nMask) == 0) { - if (ObjData & 0x40000000) { - // object is already being invalidated - // possible when no CObj left and object is invalidated and during this all CMObj are also out - return; - } + } else if ((ObjData & nMask) == 0) { + if (ObjData & 0x40000000) { + // object is already being invalidated + // possible when no CObj left and object is invalidated and during this all CMObj are also out + return; + } ObjData |= 0xc0000000; AddRef(); DestroyContents(); - assert((ObjData & nMask) == 0); // otherwise empty constructor is adding CObjs on self - ObjData &= ~0x40000000; + assert((ObjData & nMask) == 0); // otherwise empty constructor is adding CObjs on self + ObjData &= ~0x40000000; ReleaseRef(); } -} -//////////////////////////////////////////////////////////////////////////////////////////////////// +} +//////////////////////////////////////////////////////////////////////////////////////////////////// void IObjectBase::ReleaseRefComplete() { - assert(RefData == 0); - if ((ObjData & 0x3fffffff) == 0) { - assert((ObjData & 0x40000000) == 0); // object not being invalidated - delete this; - } -} + assert(RefData == 0); + if ((ObjData & 0x3fffffff) == 0) { + assert((ObjData & 0x40000000) == 0); // object not being invalidated + delete this; + } +} |