Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Memory not released after calling Addressables.Release(asyncHandle);

Discussion in 'Addressables' started by rosssssss, Oct 19, 2023.

  1. rosssssss


    Jan 27, 2017
    I'm quite new to addressables but using the Unity Memory Profiler - they don't seem to be releasing any of their memory.
    I destroy the instantiated game object - and then call Addressables.Release(asyncHandle) -
    the handle comes from the call to Addressables.LoadAssetAsync<GameObject>(address);
    The content is definitely not referenced anywhere else in the scene but when i check the profiler I can clearly see the memory rising as new groups are loaded - but none of the textures/animations/meshes etc get released again when the addressable is unloaded.
    For example with the meshes - they have three references when i first load them and this is only reduced to two when i unload them - the two remaining ones all look like the attached image - with a reference from "AssetBundle "fdskjdhf...."" remaining...
    Anybody have any idea what i'm missing?
    I've tried setting bundle mode to "Pack separately" in the "PackedAssets" settings but it didn't change anything.
    I've tried explicitly calling GC.Collect() but doesn't make a difference.
    Any clues greatly appreciated!
    Last edited: Oct 23, 2023