Which of the following two should I be using to make sure that all the cursors are closed?
Cursor c = getCursor(); if(c!=null && c.getCount()&g
I'd say the first one, mainly because the second one will try to call c.close() even if c is null. Also, according to the docs, getCount()doesn't throw any exceptions, so there's no need to include it in the try block.
c.close()
c
null
try