Search Issue Tracker
Postponed means that the issue was either a feature request or something that requires major refactoring on our side. Since that makes the issue not actionable in the close future we choose to close it as Postponed and add it on our internal roadmaps and technical debt pages instead.
Postponed
Votes
2
Found in
5.3.3p1
Issue ID
779505
Regression
No
'finally' block of try/finally in coroutine is not called when object is destroyed
Steps to reproduce:
1. Download and open attached project "CoroutineNoDisposeRepro.zip"
2. Open scene "Scene1" and play it
3. Press either "Open Scene 2" or "Destroy Object"
4. Notice that "Resource In Use" is still true, as indicated by string on the screen
5. Press "Stop And Dispose" and notice that resource is no longer in use, also indicated by string on screen "Resource Available"
Actual result: If game object which has co-routine is destroyed, "finally" part of "try {} finally {}" block is not called
Expected result: "finally" part of "try {} finally {}" block is called automatically when the object is destroyed, not only when it is manually disposed
Tested and reproduced on:
Windows 10
Unity 5.1.4f1, 5.2.4p1, 5.3.4p1, 5.4.0b13
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Adding a git url package shows it in the Unity Registry section of Package Manager
- Mesh Renderer is frozen when there are duplicate Static GameObjects
- ScalableBufferManager.widthScaleFactor always returns 1 when using DirectX 11
- [iOS] Camera loses focus when the device is near an object on some iOS devices
- "Maximum Cube Reflection Probes on Screen" is clamped to 64 when changing it to higher value than 64
Add comment