Search Issue Tracker


Fixed in 1.0.0



Found in [Package]


Issue ID




[Memory Profiler] Memory Leak when Memory Profiler is in project

Package: Memory Profiler


Steps to reproduce:
1. Create a new project
2. Install the Memory Profiler Package
3. Open the Profiler and select Memory as the only Module
4. Enter Play Mode
5. Observe that Mesh memory begins to leak with 0.1 mb increment every second

Expected results: Memory Profiler leaks Mesh memory with 0.1 mb increment if selected as Module in the Profiler
Actual results: Memory Profiler does not leak Mesh memory

Reproducible on: 2022.2.0a9, 2022.3.2f1
Not reproducible on: 2021.3.27f1, 2022.1.24f1, 2023.1.0f1, 2023.2.0a18
Could not test on 2022.2.0a8 and below due to Memory Profiler package outputting errors if added via Package.json and not appearing in the Package Manager

-Memory seems to leak only when Memory Module is enabled in the Profiler

  1. Resolution Note (fix version 1.0.0):

    Fixed in 2022.3.10f1

Comments (2)

  1. MartinTilo

    Aug 17, 2023 14:51

    The Unity and Memory Profiler package version combination matrix behind this bug is a bit complex, so in order to give some context:

    The Memory Profiler package injects an override UI into the Memory Profiler Module in the Profiler Window. The 1.1.x versions of the package (up to version 1.1.0-pre.1) had a managed memory leak. This managed leak was fixed as part of this bug, PROFB-160. Further, the Memory Profiler Module override from the package would refresh the bottom panel of the Profiler Window (whenever it would update to show data for a different frame) in a way that would trigger a mesh leak in UI Toolkit (/ Text). As part of the fix for PROFB-160 we also changed the way that the UI refresh happens. This change reduced the frequency at which the underlying mesh leak is triggered, but the change could not remove the leak entirely.

    The full fix requires an additional change, i.e. the fix of the underlying mesh leak, which is tracked separately here:
    Note: The code related to the mesh leak was changed in 2023.1.0a20. With that change, the leak no longer occurs. How that relates to a fix/backport for UUM-46520 to 2022.3 is yet TBD.

  2. Jusam

    Jul 17, 2023 02:42


Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.