QuickLib icon indicating copy to clipboard operation
QuickLib copied to clipboard

Automapper copy object reference instead of content

Open mborgues opened this issue 2 years ago • 1 comments

When an object has a second internal object (in my case a TArray<Bytes>), it is copying its reference instead of the content, however when I destroy the source object it generates an "invalid pointer operation" error, precisely because the reference assigned to the mapped object refer to the previous one.

the object (the destination object has the same fields): image

the code: image

the error: image

mborgues avatar Jun 22 '23 13:06 mborgues

Could you provide a quick code example?

exilon avatar Feb 25 '24 21:02 exilon