Skip to content

GCI-340 Android Client: Fix this Static field leak#632

Merged
f4ww4z merged 1 commit intoopenmrs:masterfrom
RSM55712:master
Dec 5, 2019
Merged

GCI-340 Android Client: Fix this Static field leak#632
f4ww4z merged 1 commit intoopenmrs:masterfrom
RSM55712:master

Conversation

@RSM55712
Copy link
Contributor

@RSM55712 RSM55712 commented Dec 4, 2019

Description of what I changed

In order to bypass the the static memory leak, I created instance variables in each of the other classes that used LinearLayouts and used that to access the methods from the PatientsDashboardActivity class.

Issue I worked on

../../src/main/java/org/openmrs/mobile/activities/patientdashboard/PatientDashboardActivity.java:61: Do not place Android context classes in static fields; this is a memory leak

Checklist: I completed these to help reviewers :)

  • [x ] My pull request only contains ONE single commit
    (the number above, next to the 'Commits' tab is 1).
  • [ x] All new and existing tests passed.
  • [ x] My pull request is based on the latest changes of the master branch.

@codecov-io
Copy link

codecov-io commented Dec 4, 2019

Codecov Report

Merging #632 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #632   +/-   ##
=======================================
  Coverage   14.29%   14.29%           
=======================================
  Files         202      202           
  Lines        9220     9220           
  Branches      791      791           
=======================================
  Hits         1318     1318           
  Misses       7821     7821           
  Partials       81       81
Impacted Files Coverage Δ
...ies/patientdashboard/PatientDashboardActivity.java 0% <ø> (ø) ⬆️
...patientdashboard/charts/PatientChartsFragment.java 0% <0%> (ø) ⬆️
...tientdashboard/details/PatientDetailsFragment.java 0% <0%> (ø) ⬆️
...patientdashboard/vitals/PatientVitalsFragment.java 0% <0%> (ø) ⬆️
...patientdashboard/visits/PatientVisitsFragment.java 0% <0%> (ø) ⬆️
...tdashboard/diagnosis/PatientDiagnosisFragment.java 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a26f97f...6582d0b. Read the comment docs.

Copy link
Member

@suthagar23 suthagar23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good. Let's wait for @f4ww4z approval

Copy link
Collaborator

@f4ww4z f4ww4z left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @roku234 . Please add a link to the JIRA issue page next time.

@f4ww4z f4ww4z merged commit 7a912ec into openmrs:master Dec 5, 2019
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

Successfully merging this pull request may close these issues.

4 participants