<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2016-04-10 18:53 GMT+02:00 Maciej Izak <span dir="ltr"><<a href="mailto:hnb.code@gmail.com" target="_blank">hnb.code@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br><div dir="ltr"><div class="gmail_extra"><span class=""></span>Important note:<br><div class="gmail_quote"><div>operator Initialize is called after system int_initialize for required record fields<br>operator Finalize is called before system int_finalize for required record fields<br></div><div>operator AddRef is called after int_addref for required fields<br></div><div><div class="gmail_extra">operator Copy is called after fpc_Copy_internal for required fields<br></div></div></div></div></div></blockquote><div><br></div></div>Small correction. Copy operator(if declared) is executed instead of fpc_Copy_internal (any other behavior has no sense). To call default fpc_Copy_internal operation is possible to call CopyArray. For example<br><br></div><div class="gmail_extra">class operator TFoo.Copy(constref aSrc: TFoo; var aDst: TFoo);<br></div><div class="gmail_extra">begin<br> CopyArray(@aDst, @aSrc, TypeInfo(TFoo), 1);<br></div><div class="gmail_extra">end;<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">I need to fix/adjust this on branch.<br></div><div class="gmail_extra">-- <br><div class="gmail_signature"><div dir="ltr"><div>Best regards,<br>Maciej Izak</div></div></div>
</div></div>