Search Issue Tracker
Fixed
Fixed in 7.0.7, 9.0.2, 10.0.0-pre.2
Votes
0
Found in [Package]
7.0.6
9.0.1
10.0.0-pre.1
Issue ID
DANB-296
Regression
No
Error “A Native Collection has not been disposed, resulting in a memory leak” occurs in Play Mode when a GameObject has the "Sprite Shape Controller" component and is a child of an inactive parent
Steps to reproduce:
1. Open the user’s project
2. Open the “SampleScene” Scene
3. Make any change in the Scene (e.g., make a GameObject active and inactive)
4. Save the Scene
5. Enter Play mode
6. Observe the Console
Expected result: No errors
Actual result: Error “A Native Collection has not been disposed, resulting in a memory leak” occurs
Reproducible with: 2021.2.7f1, 2021.3.11f1
Not reproducible with: 2022.1.0b1, 2022.1.18f1, 2022.2.0b10, 2023.1.0a13
Could not test with: 2020.3.40f1, 2021.2.6f1, 2022.1.0a1, 2022.1.0a18 (Package errors)
Reproduced on: macOS Monterey 12.5.1 (Intel)
Notes:
- The memory leak is happening because of the two last GameObjects in the Hierarchy (GameObject active, parent object inactive, and GameObject inactive, parent object inactive)
- The error does not occur in the Player
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
- Silent crash when clicking in Scene View in a specific project
- The Player renders black on a Quest headset when MSAA, Post Processing, and Spacewarm depth submission are enabled
- Graphics Compositor breaks Unity rendering when the "Output Camera" is changed to a scene Camera and one Camera SubLayer is active
- The Editor freezes on RenderGraphViewer.Repaint when entering too many characters in search fields without character limits
- Adding a new SubLayer in Graphics Compositor renders BaseLayer darker and makes it flicker
Resolution Note (fix version 10.0.0-pre.2):
Fix for this issue is available on 2D SpriteShape package 10.0.0-pre.2 and above
Resolution Note (fix version 9.0.2):
Fix for this issue is available on 2D Spriteshape package 9.0.2 and above