Skip to content

Commit

Permalink
cancel the _scheduleCleanup on CacheStore dispose (PR by EdwynZN: B…
Browse files Browse the repository at this point in the history
  • Loading branch information
contactjavas committed Sep 18, 2023
1 parent 95c5bae commit 962b614
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions flutter_cache_manager/lib/src/cache_store.dart
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@ class CacheStore {
}

Future<void> dispose() async {
if (_scheduledCleanup != null) {
_scheduledCleanup?.cancel();
}

final provider = await _cacheInfoRepository;
await provider.close();
}
Expand Down

0 comments on commit 962b614

Please sign in to comment.