Android Memory Leak android.os.message usb scanner

Hi guys, I am facing a memory leak in Android in an unexpected location. There is a tablet and a hardware usb barcode scanner. The input from the scanner must be used to identify the product. So I extended the edittext and on its keyListener intercepted the input when the usb barcode scanner input comes in and from that input, I handle the rest of my usage.

The problem occurs when I switch between fragments, memory consumption increases and with deeper analysis using MAT this is what I get.

enter image description here

I can't trace this back to any part in my code, could you shed some light on this?

Edit: Upon further investigation, I found that calling notifyDataSetChanged () on a listview adapter with a usb scanner attached is the root cause of this issue. Any hacks to handle this?

+3


source to share





All Articles