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

Commit

Permalink
Revert "* [Android] Fix potential memory leak."
Browse files Browse the repository at this point in the history
This reverts commit 361df72 and fix memory leak by make instanceWrap not global

(cherry picked from commit 07f8250)
  • Loading branch information
YorkShen committed Jun 29, 2018
1 parent 14aec0d commit 6149d49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion android/sdk/src/main/java/com/taobao/weex/WXSDKEngine.java
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ private static void register() {
registerComponent(WXBasicComponentType.HEADER, WXHeader.class);

registerModule("modal", WXModalUIModule.class, false);
registerModule("instanceWrap", WXInstanceWrap.class, true);
registerModule("instanceWrap", WXInstanceWrap.class, false);
registerModule("animation", WXAnimationModule.class, true);
registerModule("webview", WXWebViewModule.class, true);
registerModule("navigator", WXNavigatorModule.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import com.taobao.weex.common.Destroyable;
import com.taobao.weex.common.WXErrorCode;
import com.taobao.weex.common.WXException;
import com.taobao.weex.common.WXInstanceWrap;
import com.taobao.weex.common.WXModule;
import com.taobao.weex.ui.config.ConfigModuleFactory;
import com.taobao.weex.ui.module.WXDomModule;
Expand Down Expand Up @@ -184,7 +183,7 @@ static Object callModuleMethod(final String instanceId, String moduleStr, String
WXLogUtils.e("callModuleMethod >>> invoke module:" + moduleStr + ", method:" + methodStr + " failed. ", e);
return null;
} finally {
if (wxModule instanceof WXDomModule || wxModule instanceof WXTimerModule || wxModule instanceof WXInstanceWrap) {
if (wxModule instanceof WXDomModule || wxModule instanceof WXTimerModule) {
wxModule.mWXSDKInstance = null;
}
}
Expand Down

0 comments on commit 6149d49

Please sign in to comment.