aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/memory
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2023-03-21 12:45:14 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2023-03-21 12:45:14 +0300
commit1cf6f6a03c1e2d29102a6482c3444a106e1d1ab0 (patch)
tree8ed4d52bb1f04b9d64b5c68fc95284383a24c72f /library/cpp/yt/memory
parent8c039f0e189dfefc2f05e4f76c97ac5f804bb1f6 (diff)
downloadydb-1cf6f6a03c1e2d29102a6482c3444a106e1d1ab0.tar.gz
Intermediate changes
Diffstat (limited to 'library/cpp/yt/memory')
-rw-r--r--library/cpp/yt/memory/weak_ptr.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/library/cpp/yt/memory/weak_ptr.h b/library/cpp/yt/memory/weak_ptr.h
index 25a242bb8a..7602599883 100644
--- a/library/cpp/yt/memory/weak_ptr.h
+++ b/library/cpp/yt/memory/weak_ptr.h
@@ -257,7 +257,8 @@ int ResetAndGetResidualRefCount(TIntrusivePtr<T>& pointer)
{
auto weakPointer = MakeWeak(pointer);
pointer.Reset();
- if (pointer = weakPointer.Lock()) {
+ pointer = weakPointer.Lock();
+ if (pointer) {
// This _may_ return 0 if we are again the only holder of the pointee.
return pointer->GetRefCount() - 1;
} else {