Cook-E-team / Cook-E

A mobile application that helps schedule cooking with multiple recipes
GNU General Public License v3.0
2 stars 1 forks source link

SQLite code should close() Cursors #15

Closed samcrow closed 8 years ago

samcrow commented 8 years ago

All code that uses SQLite to retrieve data must explicitly close any cursors that it uses. Not doing so might cause memory or resource leaks.

Cursor closing can be ensured with try-finally blocks:

final Cursor result = ...;
try {
    get data from cursor
} finally {
    cursor.close();
}

The SQLiteAccessor class does not currently do this.

kylewoo235 commented 8 years ago

fixed