Cursor window: window is full

后端 未结 3 663
北恋
北恋 2020-12-14 06:25

I\'ve created a ListView populated by the data returned from a query.
It works, but in the LogCat I\'ve got the message:

Cursor Window: Window is full: r         


        
3条回答
  •  清歌不尽
    2020-12-14 07:14

    From my experience this means that the query results are too large for the cursor's window and it requests more memory. Most times this request is honored, but on low end devices it could throw exceptions.

    I don't know the specifics of the app in question but you referred to a ListView. A ListView cannot show 3700 rows at once and a endless list could help to load the data on demand

    My advise is to break up the query into a multiple queries that return smaller results and close them before running the next query. After each successive query combine the results.

提交回复
热议问题