| 76 | } |
| 77 | |
| 78 | @Override |
| 79 | public void dispose() { |
| 80 | try { |
| 81 | if (counterFonts != null) { |
| 82 | for (BitmapFont bitmapFont : counterFonts.values()) |
| 83 | bitmapFont.dispose(); |
| 84 | counterFonts.clear(); |
| 85 | } |
| 86 | } catch (Exception ignored) {} |
| 87 | try { |
| 88 | if (fallback_skins != null) { |
| 89 | for (Texture texture : fallback_skins.values()) |
| 90 | texture.dispose(); |
| 91 | fallback_skins.clear(); |
| 92 | } |
| 93 | } catch (Exception ignored) {} |
| 94 | try { |
| 95 | if (tmxMap != null) { |
| 96 | for (Texture texture : tmxMap.values()) |
| 97 | texture.dispose(); |
| 98 | tmxMap.clear(); |
| 99 | } |
| 100 | } catch (Exception ignored) {} |
| 101 | try { |
| 102 | if (defaultImage != null) |
| 103 | defaultImage.dispose(); |
| 104 | } catch (Exception ignored) {} |
| 105 | try { |
| 106 | if (dummy != null) |
| 107 | dummy.dispose(); |
| 108 | } catch (Exception ignored) {} |
| 109 | try { |
| 110 | if (textrafonts != null) { |
| 111 | for (Font f : textrafonts.values()) |
| 112 | f.dispose(); |
| 113 | } |
| 114 | } catch (Exception ignored) {} |
| 115 | if (cardArtCache != null) |
| 116 | cardArtCache.clear(); |
| 117 | if (avatarImages != null) |
| 118 | avatarImages.clear(); |
| 119 | if (manaImages != null) |
| 120 | manaImages.clear(); |
| 121 | if (symbolLookup != null) |
| 122 | symbolLookup.clear(); |
| 123 | if (images != null) |
| 124 | images.clear(); |
| 125 | if (avatars != null) |
| 126 | avatars.clear(); |
| 127 | if (sleeves != null) |
| 128 | sleeves.clear(); |
| 129 | if (cracks != null) |
| 130 | cracks.clear(); |
| 131 | if (borders != null) |
| 132 | borders.clear(); |
| 133 | if (deckbox != null) |
| 134 | deckbox.clear(); |
| 135 | if (cursor != null) |