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
- "Draw Additional Lights Shadowmap" calls increase when custom MaterialBlockProperty is used
- Crash on _platform_memmove when importing the "Dragon Crashers - URP 2D Sample Project" to a new 2D project
- "Shader is not supported on this GPU" warnings and and shaders are not loading when building the project for non-Chromium browsers
- [iOS][URP] The screen flickers and the "Execution of the command buffer was aborted due to an error during execution" error is thrown continuously
- Shortcut Manager shows empty conflict filter when resolving runtime conflicts involving different contexts
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