Closed ghost closed 8 years ago
I don't think so there is any memory leak. Once you can release() on ThinDownloadManager instance. All the DownloadRequests are removed from the set which DownloadQueue maintains and also the blocking queue is set to null. So all the DownloadRequest objects which is passed to ThinDownloadManager is now orphan and those will be garbage collected.
void release() {
if (mCurrentRequests != null) {
synchronized (mCurrentRequests) {
mCurrentRequests.clear();
mCurrentRequests = null;
}
}
if (mDownloadQueue != null) {
mDownloadQueue = null;
}
.......
.......
}
If you see any memory leaks through MAT or DDMS. Please file a new issue.
When I use a DownloadStatusListener in a activity, it will cause memory leak. The ThinDownloadManager.release() seems not consider this. Could you please fix it?