Deep copy, shallow copy, deep clone, shallow clone
January 27, 2024
by Tamara Foster
No Comments
1, deep cloning, shallow cloning
Scenario: Duplicate a target object 1v1
deepClone
Hyperclone, the cloned object has no strong coupling relationship with the source object
2. Deep copy and shallow copy
Scenario: several objects within the plug-in are traversed and extended to a target object by 1vN
Object extension
Plug-in development, configuration, and allowing user customization of plug-in functions takes precedence over default configurations and is overridden by user configurations
3. Common Ground
Neither shallow clone nor shallow copy has decoupling operation
Both deep clone and deep copy have decoupled operations