Quick development library (AutoMapper, LinQ, IOC Dependency Injection, MemoryCache, Scheduled tasks, Json and Yml Config and Options pattern, Serializers, etc) with crossplatform support for Delphi/Firemonkey (Windows,Linux,OSX/IOS/Android) and freepascal (Windows/Linux).
Apache License 2.0
639
stars
187
forks
source link
Automapper copy object reference instead of content #119
When an object has a second internal object (in my case a TArray), 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):
When an object has a second internal object (in my case a TArray), 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):
the code:
the error: