Activity memory leak caused by anonymous threads
cuixiaoyiyi opened this issue · 0 comments
cuixiaoyiyi commented
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.
It will hold the Activity and prevent its timely release. Refer to the links below.
https://github.com/AdrienPoupa/AttestationDeplacement/blob/master/app/src/main/java/com/poupa/attestationdeplacement/CreateAttestationActivity.java#L185
https://github.com/AdrienPoupa/AttestationDeplacement/blob/master/app/src/main/java/com/poupa/attestationdeplacement/CreateAttestationActivity.java#L210