Memory leak
See original GitHub issueHi,
After some investigation on my app, I have detected an huge memory leak coming from Mixpanel (see attached pictures).
For the moment I have no idea where it comes from but it appear as soon as I call :
MixpanelAPI.getInstance(my_context, MIXPANEL_TOKEN);
The android studio allocation tracker confirms that it comes from the Mixpanel package.
Following my investigation :
- If I call the flush method, the leak is stopped when the app is in the bakground.
- If I don’t call the flush method, the leak is still present when the app is in the bakground.
- If I call the getInstance(…) method with the wrong Token, I get no leaks.
- I have tried with version 4.5.1 and the issue is the same (my current version is 4.6.4)
- I have tried to move the Mixpanel initialization in another activity : same issue
- Same issue on multiple android version (lollipop, kitkat …).
Any idea ?
Android studio :
without_mixpanel
with_mixpanel
Issue Analytics
- State:
- Created 8 years ago
- Comments:18 (4 by maintainers)
Top Results From Across the Web
Memory leak - Wikipedia
In computer science, a memory leak is a type of resource leak that occurs when a computer program incorrectly manages memory allocations in...
Read more >What is Memory Leak? How can we avoid? - GeeksforGeeks
Memory leak occurs when programmers create a memory in heap and forget to delete it. The consequences of memory leak is that it...
Read more >Definition of memory leak - PCMag
When memory is allocated, but not deallocated, a memory leak occurs (the memory has leaked out of the computer). If too many memory...
Read more >Memory leak - OWASP Foundation
A memory leak is an unintentional form of memory consumption whereby the developer fails to free an allocated block of memory when no...
Read more >Memory Leaks and Garbage Collection | Computerworld
DEFINITION A memory leak is the gradual deterioration of system performance that occurs over time as the result of the fragmentation of a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@yinfeiru Hey Yinfei! Any chance we can reopen this issue? Let me know if I can help with additional context.
If you have some image for in app notification for eg, yes I saw the same and that lead to https://github.com/mixpanel/mixpanel-android/issues/308. Which should be fixed with the proposed solution or an alternate one.