Skip to content
This repository has been archived by the owner on Jul 2, 2021. It is now read-only.

activity-memory-leak-fix: DexterInstance calls context.getApplication… #25

Merged
merged 3 commits into from
Dec 1, 2015

Conversation

emmano
Copy link
Contributor

@emmano emmano commented Nov 29, 2015

…Context() to avoid leaks if the user initializes Dexter inside an Activity. Also, DexterInstance now holds the reference in a WeakReference variable. May need to add null checks around weakReferenceActivity.get(). EO

…Context() to avoid leaks if the user initializes Dexter inside an Activity. Also, DexterInstance now holds the reference in a WeakReference variable. May need to add null checks around weakReferenceActivity.get(). EO
@emmano emmano mentioned this pull request Nov 29, 2015
@Serchinastico
Copy link
Contributor

Hi @emmano

In a recent PR we have fixed the inner DexterActivity issue by declaring it android:launchMode="singleTask" and finishing it when the request process ends so the weakification won't be needed after all.

The getApplicationContext call is a must though, can you update the PR to only include that change? Thanks for your time!

@Serchinastico
Copy link
Contributor

Please, merge master into your branch to solve conflicts and we will release a new version with it. Thanks!

@pedrovgs
Copy link
Contributor

pedrovgs commented Dec 1, 2015

Update branch with master and 👍

Conflicts:
	dexter/src/test/java/com/karumi/dexter/DexterInstanceTest.java
@emmano
Copy link
Contributor Author

emmano commented Dec 1, 2015

Sorry. Didn't see you guys updated master. Everything should be up to date now.

@pedrovgs
Copy link
Contributor

pedrovgs commented Dec 1, 2015

@Serchinastico do we have your 👍 ?

@Serchinastico
Copy link
Contributor

Sure, I'll close the door :)

Serchinastico added a commit that referenced this pull request Dec 1, 2015
DexterInstance calls context.getApplication…
@Serchinastico Serchinastico merged commit 2d5fd96 into Karumi:master Dec 1, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants