Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android, detect open cursors in whole project

How to find cursors that are not closed in whole project that may cause memory leaks and other problems since Android lint warns them now?

like image 982
Alireza Akbari Avatar asked Jan 07 '23 03:01

Alireza Akbari


1 Answers

Finally I found the way!

from top menu: Analyze>Inspect code then whole project and OK

Now wait till Android studio finds lint problems in your app, then go to the below item and check if the not recycled item is Cursor, also you can use it for other resources that are open but not closed!

Android > Lint > Performance then Missing recycle() calls

like image 75
Alireza Akbari Avatar answered Jan 11 '23 02:01

Alireza Akbari