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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
Add comment