Questions tagged [leakcanary]

LeakCanary is a memory leak detection library for Android and Java.

LeakCanary is a memory leak detection library for and .

For more information, see the GitHub page.

390 questions
0
votes
1 answer

Anonymous implementation of okhttp3.Callback

I have recently added a leakcanary to my project to trace the leaks. So during the request to server using okhttp3 I got the leak of 8mb saying that Anonymous implementation of okhttp3.Callback So I am wondering is this from the okhttp3 or I am…
android_griezmann
  • 3,757
  • 4
  • 16
  • 43
0
votes
0 answers

LeakCanary shows leak but not complete stacktrace

I am using LeakCanary to detect leaks in my app. In the stack trace it show static hk.a | references ht.a | leaks TestActivity instance No other information. How to get more information to debug the issue? Thanks
Ashwani K
  • 7,880
  • 19
  • 63
  • 102
0
votes
1 answer

Memory leaks in AppCompatEditText

Does anyone know what causes this memory leak? I have no idea how to fix it
daiyiming
  • 19
  • 1
0
votes
1 answer

Why LeakCanary reports about leak of each activity's field even right after activity was just started?

For example, I have the following code for the custom Application class (to 'activate' LeakCanary inside project) public class MyApp extends Application { private RefWatcher refWatcher; @Override public void onCreate() { …
daxh
  • 571
  • 7
  • 14
0
votes
1 answer

Memory Leak on using PhoneStateListener

I am trying to use PhoneStateListener to notify my application when an incoming call triggers so as to perform some action. I register my PhoneStateListener in onResume() method of my activity as follows. @Override protected void onResume()…
0
votes
1 answer

Android - LeakCanary triggered - static helper method

I wrote myself a little helper class: public enum NetworkUtils { ; public static boolean hasNetworkConnection(Context context) { ConnectivityManager manager = getConnectivityManager(context); return manager != null …
JDC
  • 4,247
  • 5
  • 31
  • 74
0
votes
1 answer

will this pattern a source of leak

Having a fragment, it has a listener which is registered in a global event manager and removed from it when the fragment is destroyed. In the event listener it calls the fragment's member function foo(), which does some ui update. So the fragment…
lannyf
  • 9,865
  • 12
  • 70
  • 152
0
votes
1 answer

Leaking context although I'm releasing resources when leaving activity

I have a Fragment inside an Activity where I'm using a library named ExoMedia you can check it here on github and its a wrapper for google's ExoPlayer. In this Fragment I declare two fields : private EMVideoView emVideoView; private…
Mes
  • 1,671
  • 3
  • 20
  • 36
0
votes
1 answer

LeakCanary sometimes doesn't report leaks

I'am using leakcanary-android:1.4-beta and sometimes does not report leaks. I not understand why, but sometimes I must restart the device or try with another devices but never I found a pattern that I help me to solve this problem. I seen all issues…
Gaston Flores
  • 2,457
  • 3
  • 23
  • 42
0
votes
1 answer

A annotation on the volley note to avoid leaking

The code on the CacheDispatcher is as below. And focus on that release previous request object to avoid leaking request object when mQueue is drained. I do not know why. Can anyone tell me the reason? Thanks in advance. java Request
aheadlcx
  • 63
  • 5
0
votes
2 answers

How to find memory leaks using LeakCanary in the Android app?

Help please find memory leaks in my app. LeakCanary: -static android.app.ActivityThread.sCurrentActivityThread -references android.utill.ArrayMap.mArray -reference array java.lang.Object[].1 -references…
0
votes
0 answers

LeakCanary doesn't report leaks

I've started integration of the LeakCanary and it reported one leak that I fixed. However, through the memory dump, I see that I have multiple instances of my activity. But LeakCanary is silent. I even don't see memory dumping toasts. Yes, I do…
Eugen Martynov
  • 19,888
  • 10
  • 61
  • 114
0
votes
1 answer

Facing memory leak because of third party analytics thread

(standard input):10240:D/LeakCanary( 4167): * GC ROOT thread com.apsalar.sdk.ApsalarThread. (named 'ApsalarHTTPThread') (standard input):10241:D/LeakCanary( 4167): * leaks .MainActivity instance (standard input):10243:D/LeakCanary(…
0
votes
1 answer

Why is this memory leak occurs - android - LeakCanary

I started using Leak Canary and I get this memory leak after rotation fragment with MapView on it. 10-04 22:01:51.530 17969-18044/cz.united121.android.revizori I/art: hprof: heap dump…
United121
  • 729
  • 1
  • 10
  • 24
0
votes
1 answer

Is LeakCanary alone enough for hunting down memory leaks?

I've been using LeakCanary for a while now. It does a strikingly good job especially when considering how easy it is to integrate to any apps anyone might have out there. But is LeakCanary alone going to be enough to hunt down these leaks? How much…
Hadi Satrio
  • 4,272
  • 2
  • 24
  • 45
1 2 3
25
26