<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 09 Mar 2013, at 02:37, Joao Morais wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">On Fri, Mar 8, 2013 at 4:09 PM, Flávio Etrusco <<a href="mailto:flavio.etrusco@gmail.com">flavio.etrusco@gmail.com</a>> wrote:<br><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">procedure addintf(const aintf: IUnknown);<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">(...)<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> addintf(TInterfacedObject.Create);<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">(...)<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">It's a pity, but I don't know whether it's fixable (or if needs to be<br></blockquote><blockquote type="cite">"fixed") in the compiler.<br></blockquote><br>Works in Delphi 7 with FastMM4.<br></span></blockquote></div>[...]<div><blockquote type="cite">You are suggesting that this unlikely coincidente which causes a<br>sigsegv should be the programmer's responsibility. No thanks, I much<br>more prefer the Delphi compatibility =)<br></blockquote><div><br></div><div>It indeed only works by accident in your Delphi code. It is just as wrong in Delphi as it is in FPC. It depends on an implementation detail of the code generator's reference counting. It's like saying that a particular piece of code in which an uninitialized local variable happens to be always 0 in Delphi should have the same behaviour in FPC. We don't aim for compatibility as far as providing the same behaviour for code of which the result is undefined.</div><div><br></div><div><br></div><div>Jonas</div></div></body></html>