Unity Issue Tracker - TextMeshPro memory is not de-allocated when unloading scenes using Addressables.UnloadSceneAsync in Player
Open
UUM-74015
TextMeshPro memory is not de-allocated when unloading scenes using Addressables.UnloadSceneAsync in Player
Unity: Text (TextMeshPro)
Open
6.7.X
6.6.X
6.5.X
6.4.X
6.3.X
6.0.X
2022.3.X
Won't Fix
6.2.X
6.1.X
2021.3.X
Unity 6000.2 has reached its end of life and will not receive further updates. If you need additional fixes, please upgrade to a newer Unity version.
Cancelling: the 6000.1 version has reached its end of life. If you need additional fixes, please upgrade to a newer Unity version.
Unity 2021.3 has reached its end of life and will not receive further updates. If you need additional fixes, please upgrade to a newer Unity version.
How to reproduce:
1. Open the attached “IN-78366” project
2. Build and run the Player (File → Build And Run)
3. Open the Memory Profiler window (Window → Analysis → Memory Profiler), and ensure the Player is targeted in the “Target Selection” dropdown menu
4. Press the “Capture” button
5. In the captured snapshot, navigate to the “Unity Objects” tab and enter “Font“ into the search bar
6. Take note of the search results
7. In the Player, press the Spacebar twice to load, and then unload a scene containing a TextMeshPro element
8. Repeat steps 4 to 6
Expected result: The TextMeshPro memory is de-allocated and the number of search results is unchanged
Actual result: The TextMeshPro memory is not de-allocated and additional search results are shown
Reproducible on: Windows 11
Not reproducible on: No other environments tested
Notes:
Using ClearFontAssetGlyphCache prevents a memory leak, but does not clear the first allocation
in 2021.3.39f1 (Memory Profiler 0.7.1-pre.1) it is not possible to search as explained in the reproduction steps. However, it is possible to find the additional entries by using the “Compare Snapshots” feature
Prioritise and Follow this issue
Have a workaround or additional info about this issue?