I think you are on the right track. You need to keep looking into the MAT heap profile to determine which part of the user code is holding references to the DecodeHandler
and transitively to the BitMatrix
. Try to follow the incoming references from the BitMatric
, compute dominator trees and check out the leak suspects.
Try profiling the application to see which part of the code is responsible for the BitMatrix
allocation, try to track it back into the application code.
The fact that the CaptureActivity example experiences the same issue may be caused by a wrong use of the library, so it does not necessarily proves that the lib is leaking memory. For example, the library could have been updated while the example was left the same.