Search Issue Tracker

Fixed in 2020.1

Fixed in 2018.4, 2019.4, 2020.2

Votes

17

Found in

2018.4

2020.1

2020.2

Issue ID

1275751

Regression

No

Allocated memory is not cleared when loading and unloading scenes

Scene Management

-

How to reproduce:
1. Open the attached project ("case_1275751-Memory-Test.zip")
2. Open a profiler window
3. Make a Standalone Development build with Autoconnect Profiler and Script Debugging enabled
4. Launch the build
5. Check the initial memory footprint in the profiler
6. Click the "Cubes Scene" button to load the scene
7. Inspect memory footprint in the profiler after the scene is loaded
8. Click the "Clean Scene" button to load an empty scene
9. Compare current memory footprint with a freshly loaded project on step 5

Expected result: Memory footprint goes back to initial value or close to it
Actual result: Memory footprint significantly increases

Reproducible with: 2018.4.27f1, 2019.4.11f1, 2020.1.7f1, 2020.2.0b4

Notes:
1. The issue eventually causes out of memory crashes on Switch
2. Both UnloadUnusedAssets and GC.Collect are called after scene unload, and it can be called again by pressing the Spacebar key

  1. Response avatar

    Resolution Note (fix version 2020.1):

    Fixed in 2021.1.0a5

  2. Response avatar

    Resolution Note (fix version 2020.2):

    Fixed in 2020.2.0b12

  3. Response avatar

    Resolution Note (fix version 2020.1):

    Fixed in 2020.1.15f1

  4. Response avatar

    Resolution Note (fix version 2019.4):

    Fixed in 2019.4.16f1

  5. Response avatar

    Resolution Note (fix version 2018.4):

    Fixed in 2018.4.30f1

Comments (7)

  1. 8ff5caddb6324a35b8a573cfee8ff2d3?d=mm

    ExtraCat

    Dec 22, 2020 14:51

    Thanks for fixing it!

  2. 17489d2540f3d820ee5357ed92b286ca?d=mm

    yty

    Nov 17, 2020 03:33

    Also reproducible on unity3d2018.4.2 ...

  3. A21af8ddd3e2745488fc77ea4e359eab?d=mm

    _FLX

    Nov 14, 2020 09:10

    Also reproducible on 2018.4.28f1...

    Lot of suffering because of this.

  4. 515c0f7e2873244409631c754899ac2d?d=mm

    zrocweb

    Nov 03, 2020 17:25

    Ya know. It's getting so hard to keep any project current with all these builds and fixes. Let alone find a stable unity build that isn't a problem in some large scale one way or another.

    Issues like this should never happen. If they do they should be patched ASAP. There are a ton of people out there that don't read release notes and known issues and just come across this stuff after doing extremely large work in a project only to have to revamp a new project with a new unity version where there current project get broken. Most times it's complete re-build and re-design of a vast majority of a projects structure, etc..

    Patching current unity versions needs to be a thing of the FUTURE, like now, and stop with all the new version builds that don't do anything but cause more issues. Fix whats broke and patch it to your community, especially ones the pay for pro+ versions!!!

  5. D5ea3d8ed0b91ce363aa81b18c6c6e9e?d=mm

    ELERMOND

    Oct 25, 2020 22:31

    Unity, please fix this issue, Thanks for everything you do!

  6. 99e55ea57d599eb788044868cdc10d66?d=mm

    marc-call-healthscholars

    Oct 12, 2020 19:43

    Uhhhh this is a huge issue..... I just upgraded to 2020.1 for Switch and now just saw this :(

  7. 64997828c7bb6a64e0f8a050a5963125?d=mm

    iamarugin

    Oct 12, 2020 08:43

    I think this should be fixed as soon as possible.

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.