diff --git a/runtime/src/main/cpp/Memory.cpp b/runtime/src/main/cpp/Memory.cpp index 6a77f72cc1c..d4f8fe4c08c 100644 --- a/runtime/src/main/cpp/Memory.cpp +++ b/runtime/src/main/cpp/Memory.cpp @@ -1248,6 +1248,7 @@ OBJ_GETTER(AdoptStablePointer, KNativePtr pointer) { __sync_synchronize(); #endif KRef ref = reinterpret_cast(pointer); + UpdateRef(OBJ_RESULT, nullptr); // Somewhat hacky. *OBJ_RESULT = ref; return ref;