Why is PhoneGap Android app crashing while inserting bunch of data into SQL?

后端 未结 3 634
情书的邮戳
情书的邮戳 2021-01-03 10:21

I have PhoneGap app running in Android. When the app starts, it inserts approximately 500 rows into SQL. Table has 10 columns. It\'s not a lot of data, I have a JSON in text

3条回答
  •  长发绾君心
    2021-01-03 11:04

    OK. Found the answer. It's a limit of 512 local references. What you need to do is convert them to global references using NewGlobalRef(), or to clean up the locals shortly after creating them if they're not needed. Changing them to global references will leak memory however.

    Check out this thread for more information on this known issue.

提交回复
热议问题