On So, 2014-12-28 at 00:01 +0100, Sven Barth wrote:
> Am 27.12.2014 16:11 schrieb "Marc Santhoff" <m.santh...@web.de>:
> > Is there any way of cloning record and objects having only data fields?
> > Or do I have to copy the (non reference) fields one by one as usual?
> 
> Shouldn't the normal assignment be enough for any non-reference (aka
> non-managed pointers) fields?

In principle you are right, maybe too simple for me. ;)

To be serious I remember some problems in the past, IIRC there were
strings involved, which are in fact pointers under the surface. I'll
check that, having to dig deep ...

> Meaning first you simply assign your input record to the result (strings,
> arrays and interfaces will be handled here) and then you update those
> fields that should be "deep copied".

Should do.

-- 
Marc Santhoff <m.santh...@web.de>

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to