I just want a record count from a Search Cursor.
If I write a line like this
nom = len(list(arcpy.da.SearchCursor(pointLayer, fields, whereClause)))
do I have to worry about deleting the cursor for cleanup? And if so how?
Or is something like this safer?
with arcpy.da.SearchCursor(pointLayer, fields, whereClause) as cursor:
denom = len(list(cursor))
Or if I stick the cursor in a function will it release it when the function is done?
Thanks a lot