<div class="gmail_quote">On Wed, Feb 4, 2009 at 6:04 PM, Paolo Bonzini <span dir="ltr">&lt;<a href="mailto:bonzini@gnu.org">bonzini@gnu.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"><br>
&gt;&gt; Think about the semantics here for a minute: the whole concept of doing a<br>
&gt;&gt; #call: is that your callback is suspended, to be resumed later. I currently<br>
&gt;&gt; can&#39;t think of any case when you would want an ensure block *inside* a<br>
&gt;&gt; callback to be unwound on a #call:. Can you?<br>
&gt;<br>
&gt; No. I can&#39;t even think of a case where you would want an #ensure:<br>
&gt; within the definition of a flow.<br>
<br>
</div>Neither do I. &nbsp;Mixing #ensure: and continuations is a sure way to get<br>
either leaks or doubly released objects (which means either exceptions,<br>
or bugs too-much-reminding-of-C).<br>
<font color="#888888"></font></blockquote><div><br>That seems like &quot;conventional wisdom&quot; to me again. Obviously you can run into problems depending on what you put in your ensure block. But I don&#39;t yet see that:<br>
<br>self inform: &#39;foo&#39;.<br>self releaseAnObject<br><br>is any less likely to cause doubly released objects than<br><br>[self inform: &#39;foo&#39;] ensure: [self releaseAnObject]<br><br>Julian<br></div></div><br>