Skip to content

Activity memory leak caused by anonymous threads #3

@cuixiaoyiyi

Description

@cuixiaoyiyi

An anonymous inner class will hold a reference to the this pointer of the outer class and will not be released until the thread ends.

We have detected that your implementation has a lot of reading and writing data in anonymous threads of the Activity, and these threads will hold the Activity and prevent its timely release.

ch.hgdev.toposuite.points.PointsImporterDialog
ch.hgdev.toposuite.jobs.JobsActivity
ch.hgdev.toposuite.points.PointsImporterActivity
ch.hgdev.toposuite.jobs.JobImporterActivity

Some of the anonymous threads can be replaced by static class to eliminate unnecessary references.
And some can be replaced by the Handler class.

If you agree, a PR will be submitted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions