Search Issue Tracker

Fixed in 2020.1.X

Fixed in 2018.4.X, 2019.4.X, 2020.2.X

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. Resolution Note (fix version 2020.1):

    Fixed in 2021.1.0a5

  2. Resolution Note (fix version 2020.2):

    Fixed in 2020.2.0b12

  3. Resolution Note (fix version 2020.1):

    Fixed in 2020.1.15f1

  4. Resolution Note (fix version 2019.4):

    Fixed in 2019.4.16f1

  5. Resolution Note (fix version 2018.4):

    Fixed in 2018.4.30f1

Comments (7)

  1. ExtraCat

    Dec 22, 2020 14:51

    Thanks for fixing it!

  2. yty

    Nov 17, 2020 03:33

    Also reproducible on unity3d2018.4.2 ...

  3. _FLX

    Nov 14, 2020 09:10

    Also reproducible on 2018.4.28f1...

    Lot of suffering because of this.

  4. 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. ELERMOND

    Oct 25, 2020 22:31

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

  6. 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. 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.