Search Unity

Textures left in memory after calling Addressables.Release(handle)

Discussion in 'Addressables' started by Domarius, Apr 4, 2020.

  1. Domarius

    Domarius

    Joined:
    Jan 5, 2013
    Posts:
    103
    I'm loading and unloading levels in my game, and they have unique textures loaded using the Addressable Asset system.

    Watching the profiler, I can see the texture count going up with each level change, but never down - even though I am calling Addressables.Release(handle) on every texture handle loaded after I close one level and open another. It just keeps going up for each level loaded until I've been through all my levels. Then it finally stops (at least it doesn't load the texture's more than once each).

    I tried calling Texture.Destroy(handle.Result) and got an error "Destruction is not allowed to avoid loss of data".

    Can someone explain how to properly release the Texture from memory if it's loaded as an Addressable Asset?
     
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,822
    Flagging this for the team to provide some guidance and insight. :)
     
  3. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,822
  4. Aoedipus

    Aoedipus

    Joined:
    Jan 31, 2019
    Posts:
    25
    Has there been any resolution to this? We're experiencing a similar issue.