removeTextureAtlas method

void removeTextureAtlas (
  1. String name,
  2. {bool dispose: true}
)

Implementation

void removeTextureAtlas(String name, {bool dispose = true}) {
  var resourceManagerResource = _removeResource('TextureAtlas', name);
  var textureAtlas = resourceManagerResource?.value;
  if (textureAtlas is TextureAtlas && dispose) {
    for (var textureAtlasFrame in textureAtlas.frames) {
      textureAtlasFrame.bitmapData.renderTexture.dispose();
    }
  }
}