Skip to content
New issue

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

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

Already on GitHub? # to your account

Memory leak when changing theme/language settings during form entry #6484

Closed
seadowg opened this issue Oct 30, 2024 · 1 comment
Closed

Memory leak when changing theme/language settings during form entry #6484

seadowg opened this issue Oct 30, 2024 · 1 comment
Labels

Comments

@seadowg
Copy link
Member

seadowg commented Oct 30, 2024

Blocked by #5420

ODK Collect version

v2024.3

Problem description

Changing language/theme settings causes a memory leak as the in memory representation of the form is not cleared away when returning to the main menu on the settings change.

Steps to reproduce the problem

  1. Start a form
  2. Go to settings and change the language or theme

The memory usage of the app will increase each time you repeat these steps (even after garbage collection).

Expected behavior

The memory increase after opening a form and changing these settings should be cleaned up by garbage collection.

Other information

This happens because we wipe the backstack and start MainMenuActivity again when changing these settings which means that FormFillingActivity doesn't call exit(). This means that the FormController (and other form data) are held in memory indefinitely.

@github-project-automation github-project-automation bot moved this to not ready in ODK Collect Oct 30, 2024
@seadowg seadowg moved this from not ready to inbox in ODK Collect Oct 31, 2024
@seadowg
Copy link
Member Author

seadowg commented Nov 13, 2024

This was fixed by #6488

@seadowg seadowg closed this as completed Nov 13, 2024
@github-project-automation github-project-automation bot moved this from ready to done in ODK Collect Nov 13, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
Status: done
Development

No branches or pull requests

1 participant