Search Issue Tracker

Fixed in 5.3.7



Found in


Issue ID




Destroying Texture2D doesn't free memory



Steps to reproduce:

1. Open attached project ""
2. Open scene "repro"
3. Open "TestMemoryLeak.cs"
4. Notice that it creates new Texture2D every second. Then destroys it.
5. Run scene
6. Open task manager and notice how memory builds up

Note: This issue is only partially visible in the profiler: "Used Total" doesn't increase when memory builds up, only "Total System Memory Usage" builds up.

Reproduced with: 5.1.4f1, 5.2.4p1, 5.3.2p1, 5.4.0b4

Comments (9)

  1. shubhamswaraj2021

    Aug 18, 2020 04:46

    good one <a href="">lyricsauto</a>

  2. sophieedwards100

    Apr 13, 2020 07:16

    I intentionally destroyed Texture2D to get rid of low storage errors which were popping up again and again. One should click for help in essays. But I was so surprised to see results because of this action as they were no good.

  3. softone

    Jul 02, 2019 22:29

    It seems this can be still reproduced with 2019.1.8f1.

    When inspected with Memory Profiler, tens of old allocations could be found from memory, and if continued would eventually kill player or editor on any platform.

    And a call to Resources.UnloadUnusedAssets() still fixes this.

  4. heidibarber

    May 14, 2019 06:39

    For another workaround, save your window layout (top right drop down). When this happen, choose your saved layout and it will be visible again.

  5. bansheesoft

    Sep 06, 2017 15:29

    "For my case, calling that helped: Resources.UnloadUnusedAssets();"

    Also worked for me thanks XLUNCHBOXXX. I was just converting screen grabs to JPGs using textures. They never were release it seemed until I called the above.

  6. xLunchboxxx

    Jun 28, 2016 17:06

    For my case, calling that helped: Resources.UnloadUnusedAssets();

  7. jp_topps

    Jun 16, 2016 14:27

    I should mention that I am on 5.3.4f1 - and the device I am testing on is presently iOS. The leaks I am seeing are around 70MB for 4 textures being created and explicitly destroyed.

  8. jp_topps

    Jun 16, 2016 14:26

    I am running into this exact situation, but cannot reproduce the leak in Editor. When running on device, however, I can see the Mono heap grow on each iteration, even though the number of textures and amount of texture memory reported in the profiler remains consistent.

  9. zealousweb

    May 19, 2016 13:01

    Same issue is faced while internet connection lost while downloading videos. Both in Android & iOS

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.