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
- Search field in UI Builder's Library has no character limit
- Changing the value in UI Builder by dragging increases it by a few thousand points when reaching the borders of the screen
- ARM64 architecture DLL incorrectly copied instead of x64 when building for Windows x64
- Crash on TypeTreeIterator::GetNode when opening a specific folder
- Crash on WriteSerializedAssetsV2 when (re)entering the Play Mode in a specific project when IEnumerator Start() is used
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