0

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 doing something wrong?

android_griezmann
  • 3,757
  • 4
  • 16
  • 43

1 Answers1

2

Presumably you are performing apiCall.enqueue(new Callback()) and within this callback you are holding a reference to the hosting activity.

azizbekian
  • 60,783
  • 13
  • 169
  • 249