Skip to content

关于使用SYDialog的内存泄漏问题 #5

Description

@jxoday

image
new SYDialog.Builder(context)
.setDialogView(R.layout.dialog_garbage_details)
//设置动画
.setAnimStyle(R.style.AnimUp)
//设置屏幕宽度比例
.setScreenWidthP(1.0f)
//设置屏幕高度比例
.setScreenHeightP(1.0f)
//设置背景透明度
.setWindowBackgroundP(0.5f)
//设置是否屏蔽物理返回键 true不屏蔽 false屏蔽
.setCancelable(true)
//设置dialog外点击是否可以让dialog消失
.setCancelableOutSide(true)
.setBuildChildListener((dialog, view, layoutRes) -> initView(dialog, view))
.setOnDismissListener(dialog -> GarbageDetailsDialog.this.context = null)
.show();

写了 GarbageDetailsDialog.this.context = null 还是有内存泄漏

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions