apptentive / apptentive-android

Apptentive Android SDK
http://www.apptentive.com
BSD 3-Clause "New" or "Revised" License
65 stars 64 forks source link

Two fixes to prevent memory leak from occuring. #62

Closed bishopmatthew closed 10 years ago

bishopmatthew commented 10 years ago

I'm using Apptentive in one of my apps inside multiple activities, and I was debugging some memory issues. I noticed that some of these activities were being held onto after they've been finished by Apptentive. These two changes seem to fix the issue.

I've also attached a screenshot from Eclipse MemoryAnalyzer showing the problem. The IntroActivity_ that is shown has already been finished. But it still shows up in the memory dump, and when I check the path to GC root these two references show up (along with another library with the same problem).

Let me know if you have any questions.

eclipse_memory_analyzer

skykelsey commented 10 years ago

Thanks Matthew. I'll take a look at this and get back to you.

skykelsey commented 10 years ago

Actually, this looks very straight forward, so I'll most likely just merge it tomorrow. Would you mind filling out our contributor agreement?

https://docs.google.com/a/apptentive.com/spreadsheet/viewform?usp=drive_web&formkey=dDhMaXJKQnRoX0dRMzZNYnp5bk1Sbmc6MQ#gid=0

I really appreciate your help!

bishopmatthew commented 10 years ago

Ok, I signed the CLA. Glad to help!

On Wed, Oct 30, 2013 at 11:10 PM, Sky Kelsey notifications@github.comwrote:

Actually, this looks very straight forward, so I'll most likely just merge it tomorrow. Would you mind filling out our contributor agreement?

https://docs.google.com/a/apptentive.com/spreadsheet/viewform?usp=drive_web&formkey=dDhMaXJKQnRoX0dRMzZNYnp5bk1Sbmc6MQ#gid=0

I really appreciate your help!

— Reply to this email directly or view it on GitHubhttps://github.com/apptentive/apptentive-android/pull/62#issuecomment-27461699 .

skykelsey commented 10 years ago

Thanks Matthew! I'm going to merge this manually and include it in the next release.