Skip to content

Commit

Permalink
Merge pull request #821 from zwc456baby/dev-test
Browse files Browse the repository at this point in the history
修复打出的包崩溃问题,release下不启用内存泄漏检测
  • Loading branch information
kkevsekk1 authored Feb 5, 2024
2 parents 91c2852 + 43b5b91 commit 30bb1d6
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import com.stardust.app.GlobalAppContext;
import com.stardust.autojs.R;
import com.stardust.autojs.BuildConfig;
import com.stardust.autojs.ScriptEngineService;
import com.stardust.autojs.annotation.ScriptVariable;
import com.stardust.autojs.core.accessibility.AccessibilityBridge;
Expand Down Expand Up @@ -438,9 +439,12 @@ public void onExit() {
ignoresException(ui::recycle);
// ignoresException(paddle::release);

//引用检查
AppWatcher.INSTANCE.getObjectWatcher().expectWeaklyReachable(this,
engines.myEngine().toString() + "::" + TAG);
if(BuildConfig.DEBUG){
//引用检查
// release 状态不启用监听
AppWatcher.INSTANCE.getObjectWatcher().expectWeaklyReachable(this,
engines.myEngine().toString() + "::" + TAG);
}
}

private void ignoresException(Runnable r) {
Expand Down

0 comments on commit 30bb1d6

Please sign in to comment.