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
- GPU utilization increases by 20% on Meta Quest headsets when Render Graph is enabled on 6000.0.16f1 and higher
- Value on Slider (Int) control in UI Builder displays as default when saving UI Document
- Color mismatch in UI Builders Library panel when the Editors theme is set to Light Mode
- [Android ] "AndroidJNI.ToBooleanArray" returns a random non-zero value instead of "IntPtr.Zero" when the method argument is null
- Non-HDR color picker opens when selecting material color with HDR enabled
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