AndroidPicker icon indicating copy to clipboard operation
AndroidPicker copied to clipboard

避免maskView导致的内存泄露

Open houyinyu opened this issue 2 years ago • 1 comments
trafficstars

建议在BottomDialog的 removeMaskView() 方法中,移除maskView和异常后对maskView置空,避免内存泄露:

        if (maskView == null) {
            DialogLog.print("mask view is null");
            return;
        }
        try {
            activity.getWindowManager().removeViewImmediate(maskView);
            maskView=null;
            DialogLog.print("dialog remove mask view");
        } catch (Throwable e) {
            //...not attached to window manager
            // Activity ...... has leaked window android.view.View
            DialogLog.print(e);
            maskView=null;
        }
    }

houyinyu avatar Jun 18 '23 06:06 houyinyu

@houyinyu 已发布 4.1.12 版本

liyujiang-gzu avatar Jul 22 '23 03:07 liyujiang-gzu