Tag

ShallowCopy

0 views collected around this technical thread.

Sanyou's Java Diary
Sanyou's Java Diary
Feb 7, 2022 · Backend Development

Understanding Shallow vs Deep Copy in Java: A Practical Cloneable Guide

This article explains the differences between shallow and deep copying in Java, illustrates how the Cloneable interface and the clone() method work, provides complete code examples for both copy types, and clarifies the concept of reference copying with diagrams and test outputs.

CloneableDeepCopyJava
0 likes · 4 min read
Understanding Shallow vs Deep Copy in Java: A Practical Cloneable Guide
Sohu Tech Products
Sohu Tech Products
Jan 26, 2022 · Mobile Development

Crash Caused by Mutating a Collection During Enumeration and the Mechanics of copy vs mutableCopy in Objective‑C

This article documents a runtime crash triggered by mutating an NSMutableSet while enumerating it, explains how the Objective‑C copy attribute works, demonstrates shallow and deep copy behavior for strings and collections, and provides low‑level source analysis of the copy implementation in the Apple runtime.

CopyDeepCopyMutableSet
0 likes · 14 min read
Crash Caused by Mutating a Collection During Enumeration and the Mechanics of copy vs mutableCopy in Objective‑C
Top Architect
Top Architect
Aug 18, 2021 · Backend Development

Understanding Spring BeanUtils.copyProperties: Shallow Copy, Use Cases, and Code Examples

This article explains how Spring's BeanUtils.copyProperties performs a shallow copy, outlines scenarios where it is appropriate, compares it with manual setters, and provides Java code examples illustrating its behavior with parent‑child classes and common pitfalls.

BeanUtilsCodeExampleJava
0 likes · 5 min read
Understanding Spring BeanUtils.copyProperties: Shallow Copy, Use Cases, and Code Examples