Search Issue Tracker
By Design
Votes
0
Found in
2021.3.16f1
2022.1.24f1
2022.2.2f1
2023.1.0a24
Issue ID
UUM-24701
Regression
Yes
"SpriteAtlas.GetSprite" causes an increase in memory usage when called too frequently
Reproduction steps:
# Open the user’s attached project “MemLeak_Project“
# Open “Assets/Scenes/SampleScene.unity“ Scene
# Enter the Play mode
# Open Profiler (Window > Analysis > Profiler)
# Observe slowly increasing memory usage
Expected result: Memory usage is not increasing
Actual result: Memory usage slowly increasing
Reproducible with: 2021.2.0b13, 2021.2.19f1, 2021.3.16f1, 2022.1.24f1, 2022.2.2f1, 2023.1.0a23
Not Reproducible with: 2020.3.43f1, 2021.2.0b12
Reproducible on: Intel MacOS Ventura 13.0
Note: The ”Scene Objects” field is constantly growing
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
- Unrecognized identifier DECLARE_STACK_CB error is thrown when VirtualTexture Property is used with Custom RenderTexture target
- SpriteShapeController.OnWillRenderObject() is ~20 ms when using SpriteShapeController.BakeMesh() and never updating the spline
- Editor freezes briefly when "multi-selecting" TextMeshPro GameObjects In the Hierarchy window in Prefab Mode, if 5 or more Inspector windows are open
- OnEndDrag event not triggered when losing Editor focus during simultaneous Left and Right mouse drag
- Texture displays visual artifacts and has a broken aspect ratio when it is imported in RGB 48-bit format
Resolution Note:
SpriteAtlas.GetSprite will always cause increase in memory as it clones the Sprite Object, this is expected. Calling the API frequently will hence cause a more noticeable memory increase
API Docs: https://docs.unity3d.com/ScriptReference/U2D.SpriteAtlas.GetSprite.html