From 4231441e811c7e966b8ecc9c7eb9dbcd1eccb719 Mon Sep 17 00:00:00 2001 From: Nikolay Igotti Date: Wed, 27 Dec 2017 21:31:21 +0300 Subject: [PATCH] Fix workers sample (#1196) --- runtime/src/main/cpp/Memory.cpp | 1 + 1 file changed, 1 insertion(+) 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;