Don't call Map.clear() in Haxe 3.

This commit is contained in:
player-03
2023-06-06 21:55:37 -04:00
committed by GitHub
parent 76c76652cc
commit 71c1854779

View File

@@ -612,11 +612,19 @@ class AssetLibrary
}
public function unload():Void {
#if haxe4
cachedBytes.clear();
cachedFonts.clear();
cachedImages.clear();
cachedAudioBuffers.clear();
cachedText.clear();
#else
cachedBytes = new Map<String, Bytes>();
cachedFonts = new Map<String, Font>();
cachedImages = new Map<String, Image>();
cachedText = new Map<String, String>();
classTypes = new Map<String, Class<Dynamic>>();
#end
}
@:noCompletion private function __assetLoaded(id:String):Void