未验证 提交 faca00ae 编写于 作者: 马根堂 提交者: Gitee

[master]fix RemoteObject mem leak

Signed-off-by: N马根堂 <magentang4@huawei.com>
上级 5923d591
...@@ -249,7 +249,6 @@ sptr<JRemoteObject> JRemoteObjectHolder::Get(jobject object) ...@@ -249,7 +249,6 @@ sptr<JRemoteObject> JRemoteObjectHolder::Get(jobject object)
// grab an strong reference to the object, // grab an strong reference to the object,
// so it will not be freed util this reference released. // so it will not be freed util this reference released.
sptr<JRemoteObject> tmp = cachedObject_.promote(); sptr<JRemoteObject> tmp = cachedObject_.promote();
if (tmp == nullptr) { if (tmp == nullptr) {
tmp = new JRemoteObject(object, descriptor_); tmp = new JRemoteObject(object, descriptor_);
cachedObject_ = tmp; cachedObject_ = tmp;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册