[fpc-pascal] cloning data containers

Sven Barth pascaldragon at googlemail.com
Sun Dec 28 00:01:55 CET 2014


Am 27.12.2014 16:11 schrieb "Marc Santhoff" <M.Santhoff at 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?
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".

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20141228/2d9beeb1/attachment.html>


More information about the fpc-pascal mailing list