diff --git a/ipc/native/src/jni/source/ohos_rpc_remote_object.cpp b/ipc/native/src/jni/source/ohos_rpc_remote_object.cpp index 483d720529260027aeae618e09e2fadb50a5e68f..5fe3fc48f7650c758bfab833bece7d7be42b4551 100644 --- a/ipc/native/src/jni/source/ohos_rpc_remote_object.cpp +++ b/ipc/native/src/jni/source/ohos_rpc_remote_object.cpp @@ -249,7 +249,6 @@ sptr JRemoteObjectHolder::Get(jobject object) // grab an strong reference to the object, // so it will not be freed util this reference released. sptr tmp = cachedObject_.promote(); - if (tmp == nullptr) { tmp = new JRemoteObject(object, descriptor_); cachedObject_ = tmp;