Search Issue Tracker


Fixed in 2021.3.36f1, 2022.3.20f1, 6000.0.0b11



Found in





Issue ID




Memory leak when building AssetBundles



Reproduction steps:
1. Open project “”
2. Click “Test\MakeBundle” through the Main menu
3. Open the Activity Monitor and observe Memory usage next to Unity

Expected result: the memory does not increase
Actual result: the memory starts increasing until the AssetBundle is built

Reproducible with: 2021.3.31f1, 2022.3.10f1
Not reproducible with: 2023.1.0a20, 2023.1.16f1
Couldn’t test with: 2023.1.0a19, 2023.2.0b12, 2023.3.0a9 (due to compiler errors)

Reproducible on: macOS Ventura 13.2.1 (Intel), Windows 11
Not reproducible on: no other environment tested

Note: Couldn’t find the exact fixed version for the 2023.1 stream due to compiler errors in versions 2023.1.0a1 - 2023.1.0a19

  1. Resolution Note (fix version 2022.3.20f1):

    This should fix a memory leak when enumerating files on OSX. No changes to customer code should be required.

Comments (7)

  1. timtunity3d

    May 10, 2024 14:51

    Unfortunately, we have not been able to reproduce the crash. Submitting a new bug report/sample project when you get the crash would be helpful. Also make sure your setting for Max Sprite
    Atlas Cache Size (GB) in your Editor Project Settings is set to a small enough value for your system.

  2. ILARK

    May 09, 2024 16:41

    Same here.
    Still not resolved. Tested on 2021.3.21f1, 2021.3.34f1, 2022.3.20f1. Bundles are about about 2GB for Android. I have 32GB RAM. With each new bundle build, Unity uses 100% of physical memory. It causes crashes of Unity and Windows. Really need this fix to work.

  3. mhchoi_unity

    Mar 28, 2024 03:23

    This issue is not resolved yet. As we tested on 2022.3.20f1, there's still the memory increasing issue on our project. It takes up to 30GB of memory during asset bundle build on our mac machine. When we see the memory profiler, it seems that all of sprites in asset bundle were not released from memory during the whole build process. It didn't work like that on 2019.3.31f1 - Sprites was released from memory right after using it and keep the memory usage below 5GB during the build. We're still waiting for the fix now.

  4. sn_coder

    Mar 11, 2024 01:33

    This is happening on ubuntu-22.04 when running via github actions. I upgraded to 2021.3.36f1 and it hasn't been resolved

  5. SZCodeLab

    Jan 24, 2024 08:58

    Upvote for subscribing to the solving alarm.

  6. bagelcode

    Jan 17, 2024 08:59

    Same issue here.
    In version 2019.3.31, building asset bundles used about 4GB of memory,
    but in version 2022.3.10, the memory usage increases progressively during asset bundle building, reaching up to 27GB.
    Once increased, the memory usage remains high even after the asset bundle build is completed. This issue is critical when doing multiple builds, so it needs to be resolved quickly.

  7. mhchoi_unity

    Dec 20, 2023 08:05

    Same here. I've checked on 2022.3.15f1 and confirmed that the issue is not resolved. Our product need to build asset bundles over 3GB, and it consumes almost 30GB of memory on our mac and get crashes finally.

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.