Merge "Fix resource leakage caused by cursor"
This commit is contained in:
@@ -94,6 +94,8 @@ public class UserDictionaryCursorLoader extends CursorLoader {
|
||||
hashSet.add(hash);
|
||||
result.addRow(new Object[]{id, word, shortcut});
|
||||
}
|
||||
// The cursor needs to be closed after use, otherwise it will cause resource leakage
|
||||
candidate.close();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user