Search Issue Tracker
Fixed in 5.3.7
Votes
23
Found in
5.3.0f4
Issue ID
765799
Regression
No
Destroying Texture2D doesn't free memory
Steps to reproduce:
1. Open attached project "765799.zip"
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
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
shubhamswaraj2021
Aug 18, 2020 04:46
good one <a href="https://www.lyricsauto.com">lyricsauto</a>
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 http://www.toptenwritingservices.com/essaysoft-net-review/ for help in essays. But I was so surprised to see results because of this action as they were no good.
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.
heidibarber
May 14, 2019 06:39
For another workaround, save your window layout (top right drop down). https://happywheels2.io When this happen, choose your saved layout and it will be visible again.
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.
xLunchboxxx
Jun 28, 2016 17:06
For my case, calling that helped: Resources.UnloadUnusedAssets();
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.
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.
zealousweb
May 19, 2016 13:01
Same issue is faced while internet connection lost while downloading videos. Both in Android & iOS