Commit 740b6122 authored by krisgiesing's avatar krisgiesing

Merge pull request #1335 from krisgiesing/asset_close

Remove unused close method from AssetBundle
parents d10c5628 dab7dde3
......@@ -19,7 +19,6 @@ import 'image_resource.dart';
import 'shell.dart';
abstract class AssetBundle {
void close();
ImageResource loadImage(String key);
Future<String> loadString(String key);
Future<core.MojoDataPipeConsumer> load(String key);
......@@ -30,8 +29,6 @@ class NetworkAssetBundle extends AssetBundle {
final Uri _baseUrl;
void close() { }
String _urlFromKey(String key) => _baseUrl.resolve(key).toString();
Future<core.MojoDataPipeConsumer> load(String key) async {
......@@ -66,12 +63,6 @@ class MojoAssetBundle extends AssetBundle {
Map<String, ImageResource> _imageCache = new Map<String, ImageResource>();
Map<String, Future<String>> _stringCache = new Map<String, Future<String>>();
void close() {
_bundle.close();
_bundle = null;
_imageCache = null;
}
Future<ui.Image> _fetchImage(String key) async {
return await decodeImageFromDataPipe(await load(key));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment