Unity Issue Tracker - "NativeCollection not disposed" error is thrown when recompiling scripts
Closed
UUM-20873
"NativeCollection not disposed" error is thrown when recompiling scripts
Unity: Core Runtime
Won't Fix
2021.3.X
2020.3.X
This Unity version will no longer be receiving patch updates.
How to reproduce:
1. Open the attached project “IN_15912”
2. Open “SampleScene” Scene
3. Go to PrimeTile → Demos → Scenes → Scenes
4. Open “AgentTarget” script
5. Add a comment and save
6. Observe the Console
Expected result: no error in the Console
Actual result: error in the Console
Reproducible with: 2020.3.40f1, 2021.3.11f1
Couldn’t test with: 2022.1.18f1, 2022.2.0b8, 2023.1.0a12 (due to compiler errors)
Full error: “A Native Collection has not been disposed, resulting in a memory leak. Enable Full StackTraces to get more details.”
Prioritise and Follow this issue
Have a workaround or additional info about this issue?