<br><br><div class="gmail_quote">On Sat, Mar 13, 2010 at 3:45 PM, Igor Stasenko <span dir="ltr">&lt;<a href="mailto:siguctua@gmail.com">siguctua@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Guys, i need your opinion on this.<br>
What are you generally thinking about this idea?<br>
If it ok in general, and you want it to be in VM, then i will continue<br>
with my effort to fix all remarks, which<br>
Levente and others pointed out.<br>
But since only Levente and Andreas commented this so far, and i can&#39;t<br>
decide if this feature is accepted by<br>
others or not.<br>
If you think this is not the way to go, please explain why you think that.<br>
Sure thing i, as an author want this change to be integrated.<br></blockquote><div><br></div><div>I&#39;m not sure I understand the semantics yet.  Andreas and I discussed it a little today and we thought that is that it is a way of associating a finalizer with a specific object such that the such that the object is still alive when it is finalized.  But now I reread your proposal it looks like the finalizer gets run only when its object has been collected.</div>
<div><br></div><div>The most important thing is for the finalization system not to be post-mortem (not run a finalization action when the object is already dead).  Consider a buffered file.  The finalization action should flush the buffer as well as close the file handle.  If the finalization is post-mortem then one finalizes a copy of the file.  Hence to ensure that the copy has the same buffer state one has to update the copy every time the real file&#39;s buffer changes state, and that&#39;s bad for performance.</div>
<div><br></div><div>If I&#39;ve misunderstood the proposal then please try and write a more comprehensible specification.  If however the proposal still does post-mortem finalization then IMO its not worth it and we should try and implement a pre-mortem scheme where the garbage collector detects when an object is about to be collected (usually implemented by the GC detecting when the object is only referenced from finalizers, and queueing the finalizers).</div>
<div><br></div><div>2˘</div><div><br></div><div>cheers</div><div>Eliot</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<font color="#888888"><br>
--<br>
</font><div><div></div><div class="h5">Best regards,<br>
Igor Stasenko AKA sig.<br>
</div></div></blockquote></div><br>