releaseCache static method

Future releaseCache()

Release all native(ios/android) caches, normally no calls are required.

The main purpose is to help clean up problems where memory usage may be too large when there are too many pictures.

Warning:

Once this method is invoked, unless you call the getAssetPathList method again, all the AssetEntity and AssetPathEntity methods/fields you have acquired will fail or produce unexpected results.

This method should only be invoked when you are sure you really want to do so.

This method is asynchronous, and calling getAssetPathList before the Future of this method returns causes an error.

释放资源的方法,一般情况下不需要调用

主要目的是帮助清理当图片过多时,内存占用可能过大的问题

警告:

一旦调用这个方法,除非你重新调用 getAssetPathList 方法,否则你已经获取的所有AssetEntity/AssetPathEntity的所有字段都将失效或产生无法预期的效果

这个方法应当只在你确信你真的需要这么做的时候再调用

这个方法是异步的,在本方法的Future返回前调用getAssetPathList 可能会产生错误

Implementation

static Future releaseCache() async {
  await _plugin.releaseCache();
}