<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Well that spoils that idea! Is there any way to determine if
it's pointer-based so you can swap references instead of going
through the whole penalty of creating and destroying temporary
objects?</p>
<p>Kit<br>
</p>
<div class="moz-cite-prefix">On 28/11/2022 10:07, Sven Barth wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAFMUeB9MY=YqgGnOH=48FCkU540yd5yvu1LBtOC23jpDJC7JuQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="auto">
<div>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">J. Gareth Moreton via
fpc-devel <<a
href="mailto:fpc-devel@lists.freepascal.org"
moz-do-not-send="true" class="moz-txt-link-freetext">fpc-devel@lists.freepascal.org</a>>
schrieb am Mo., 28. Nov. 2022, 11:01:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Just
want to clarify something... if a type is managed, can it
be safely <br>
typecast to a pointer in all instances and on all
platforms? (The <br>
purpose being so if I wanted to swap two items, so there's
no overall <br>
change in the reference counters, I can simply swap the
pointers... <br>
there's no dereferencing involved!)<br>
</blockquote>
</div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">No, managed does not automatically mean that
it's a Pointer based type. Records with management operators,
Variants and Windows WideString are managed as well. </div>
<div dir="auto"><br>
</div>
<div dir="auto">Regards, </div>
<div dir="auto">Sven </div>
<div dir="auto">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote>
</div>
</div>
</div>
</blockquote>
</body>
</html>