majidgolshadi / Android-Download-Manager-Pro

Android/Java download manager library help you to download files in parallel mechanism in some chunks.
MIT License
1.62k stars 317 forks source link

Cursor object not always closed properly #36

Closed zunjae closed 7 years ago

zunjae commented 8 years ago

for example you forgot to close it in TaskDataSource in the method getUnCompletedTasks

You are also not persistent in the way you close your cursors. Sometimes you check if the cursor object is null, and sometimes you do not.

Is there also a reason why the connection to the database is never closed? I see an unused method called close() in TaskDataSource. I do not properly understand the source code just yet to understand when I should call this method

majidgolshadi commented 8 years ago

Thank you for your feedback. I create a pull request #40 . @zunjae Would you please see and feedback