Skip to content
This repository has been archived by the owner on Aug 10, 2021. It is now read-only.

Commit

Permalink
Review feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikolay Igotti committed Apr 9, 2019
1 parent 87cc869 commit 36bd844
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions runtime/src/main/cpp/Memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1982,14 +1982,6 @@ OBJ_GETTER(AdoptStablePointer, KNativePtr pointer) {
MEMORY_LOG("adopting stable pointer %p, rc=%d\n", \
ref, (ref && ref->container()) ? ref->container()->refCount() : -1)
UpdateReturnRef(OBJ_RESULT, ref);
if (ref != nullptr) {
auto* container = ref->container();
// Effectively adoption is like allocation, so for the normal objects - do the same thing.
if (container != nullptr && container->tag() == CONTAINER_TAG_NORMAL) {
IncrementRC</* Atomic = */ false>(container);
EnqueueDecrementRC</* CanCollect = */ true>(container);
}
}
DisposeStablePointer(pointer);
return ref;
}
Expand Down

0 comments on commit 36bd844

Please sign in to comment.