<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><span style="color:rgb(0,0,0);font-size:12.8px"><div dir="ltr">Documentation says: "The finally block always executes when the try block exits"</div><div dir="ltr">Not "The finally block always executes"</div><div dir="ltr"><br></div><div>I think there are 3 areas to seek an answer about correct VT behavior.<br><br></div><div>First is general, "sky-level" rules. GC rule says that "what is unreferenced and is not GC root, is collectable". The rule says that VT should be collectable, but many may contest that the rule - as very generic - is not applicable for blocked VT. But the rule works: blocked VT is successfully GC-able, if only observability is off.<br><br>Second is habits. I agree that there is a habit that "finally block" is always executed. But maybe it is just a habit? I think VT GC case in something fresh and cannot be matched to existing experience, but if do "kill -s SIGTERM", which is more cooperative than SIGKILL or unplug power, "finally block" is not executed<br> <br></div><div>Third is common sense. If something is unreachable, better reclaim resources and pray it works than have a memory leak and countdown to OOM.</div></span><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"></div></div></div></div><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><blockquote type="cite"><div dir="ltr"><div dir="ltr">
</div>
</div></blockquote></div></blockquote></div></div></div></div></div></div>