I am using KeyValueStore without cursor. My application stored some user variables (string and boolean, each 2 seconds). But about 10 minutes later i am getting memory error. How can i override to KeyValueStore or clean memory? Thanks
B4X:
Copying updated assets files (20)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
** Activity (main) Resume **
onAuthStateChanged: com.google.firebase.auth.internal.zzn@1cbe0a2
onAuthStateChanged: com.google.firebase.auth.internal.zzn@1cbe0a2
onAuthStateChanged: com.google.firebase.auth.internal.zzn@1cbe0a2
*** Service (firebasemessaging) Create ***
** Service (firebasemessaging) Start **
.......................................... 'There are hundreds more same lines here (** Service (firebasemessaging) Start **)
** Service (firebasemessaging) Start **
** Service (firebasemessaging) Start **
Error occurred on line: 24 (KeyValueStore)
android.database.CursorWindowAllocationException: Cursor window allocation of 2048 kb failed.
at android.database.CursorWindow.<init>(CursorWindow.java:108)
at android.database.AbstractWindowedCursor.clearOrCreateWindow(AbstractWindowedCursor.java:198)
at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:138)
at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:132)
at anywheresoftware.b4a.sql.SQL$CursorWrapper.getRowCount(SQL.java:335)
at anywheresoftware.b4a.sql.SQL$ResultSetWrapper.NextRow(SQL.java:457)
at DemirHaber.Mobile.keyvaluestore._get(keyvaluestore.java:83)
at DemirHaber.Mobile.b4xpagesohbet._verioku(b4xpagesohbet.java:235)
at DemirHaber.Mobile.b4xpagesohbet._girisekraniacik(b4xpagesohbet.java:764)
at DemirHaber.Mobile.b4xpagesohbet._giriskontrol(b4xpagesohbet.java:787)
at DemirHaber.Mobile.b4xpagesohbet._sql_ready(b4xpagesohbet.java:948)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.BA$2.run(BA.java:387)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6161)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:892)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:782)
** Activity (main) Pause event (activity is not paused). **