Skip to content

ColorPickerDialog.newBuilder() creates a DialogFragment instead of a Dialog, encouraging memory leaks #114

Open
@AndroidDeveloperLB

Description

@AndroidDeveloperLB

It creates "ColorPickerDialog extends DialogFragment" , so when I use this:

val dialog: ColorPickerDialog = ColorPickerDialog.newBuilder().....create()

I can actually call now dialog.setColorPickerDialogListener , which has the scope of the current class, and that's usually an Actvity/Fragment.

This can lead to memory leaks and reaching things that are destroyed.

Please offer an alternative which is a real Dialog, instead.

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