Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Activity memory leak caused by anonymous threads #3

Open
cuixiaoyiyi opened this issue Aug 29, 2022 · 1 comment
Open

Activity memory leak caused by anonymous threads #3

cuixiaoyiyi opened this issue Aug 29, 2022 · 1 comment

Comments

@cuixiaoyiyi
Copy link

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.

@rolinh
Copy link
Contributor

rolinh commented Aug 29, 2022

Hi, thanks for the report. PR very welcome 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants