Cache#removeImage()

removeImage(key, destroyBaseTexture)

Removes an image from the cache.

You can optionally elect to destroy it as well. This calls BaseTexture.destroy on it.

Note that this only removes it from the Phaser Cache. If you still have references to the data elsewhere
then it will persist in memory.

Parameters
Name Type Argument Default Description
key string

Key of the asset you want to remove.

destroyBaseTexture boolean <optional>
true

Should the BaseTexture behind this image also be destroyed?

Source code: loader/Cache.js (Line 1656)
doc_phaser
2017-02-14 10:40:28
Comments
Leave a Comment

Please login to continue.