Android Question Barcode Scanner memory problems

Discussion in 'Android Questions' started by Ramon Bustamante, Dec 10, 2017.

  1. Ramon Bustamante

    Ramon Bustamante Member Licensed User

    Based on https://www.b4x.com/android/forum/t...feb-2016-new-library-files-in-post-105.60155/ it seems that there are problems with the library because the available memory after call it decrease a lot and this happens every time the proccess it is called.

    Based on the application b4aZXscannerLiveView.zip I develop an activity with a call to a su to obtain the free memory:

    Sub GetFreeMemory As String

    Dim r As Reflector
    r.Target = r.RunStaticMethod("java.lang.Runtime", "getRuntime", Null, Null)
    Return ("available Memory = " & ((r.RunMethod("maxMemory") - r.RunMethod("totalMemory"))/(1024*1024)) & " MB")

    End Sub
     
  2. Johan Schoeman

    Johan Schoeman Expert Licensed User

  3. Ramon Bustamante

    Ramon Bustamante Member Licensed User

    How do you get obj an zxslv to null. If I put zxslv=null I obtain: java.lang.RuntimeException: Object should first be initialized (zxScannerLiveView).
    In the thread of the link nothing relevant for the use it said.

    I think that there is a memory leak in ZxScannerLiveView.jar because every time a bar code scan is made, memory disappears.
     
Loading...