0

I'm trying to read through his tutorial. However I never saw how the textures were disposed.

Does the assetmanager dispose the loaded texture by the dispose() call?

Newd
  • 2,174
  • 2
  • 17
  • 31
  • 1
    Yes. You could have seen this for yourself by reading the Javadoc: http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/assets/AssetManager.html#dispose-- – Tenfour04 Jul 20 '15 at 17:25
  • Thanks for that quick respond i was just confused when i was looking at the AssetMAnager class "// only dispose of assets that are root assets (not referenced)". –  Jul 20 '15 at 17:32
  • That's not documentation for users. It's an internal comment in the code. I think the idea there is that they don't want to call `dispose()` on an object that is a "child" of another object because it's redundant. For example, there might be multiple Textures in a TextureAtlas, so `dispose()` only needs to be called once, on the TextureAtlas. If you want to dispose of something that was loaded by an AssetManager, you should call `assetmanager.unload()` on it instead of calling `dispose()` directly on the object. – Tenfour04 Jul 20 '15 at 18:09

0 Answers0