Top "Shallow-copy" questions

A shallow copy of an object is a duplicate that may not be fully independent of the original, in the sense that any references / pointers it holds to other objects refer to the same objects that the original's do.

Why and when to use angular.copy? (Deep Copy)

I've been saving all the data received from services direct to local variable, controller, or scope. What I suppose would …

javascript angularjs deep-copy shallow-copy
How do I create a copy of an object in PHP?

It appears that in PHP objects are passed by reference. Even assignment operators do not appear to be creating a …

php copy clone shallow-copy
In Java, what is a shallow copy?

java.util.Calendar.clone() returns "...a new Calendar with the same properties" and returns "a shallow copy of this Calendar". …

java clone shallow-copy
Shallow copy of a Map in Java

As I understand it, there are a couple of ways (maybe others as well) to create a shallow copy of …

java map clone shallow-copy
clearing or set null to objects in java

I was recently looking into freeing up memory occupied by Java objects. While doing that I got confused about how …

java memory-management null deep-copy shallow-copy
Fastest Way to do Shallow Copy in C#

I wonder what is the fastest way to do shallow copying in C#? I only know there are 2 ways to …

c# cloning shallow-copy
Shallow copy or Deep copy?

I am a bit new to these two methods of copying one object into the other. I am confused and …

c# deep-copy shallow-copy
How to clone or copy a set in Python?

For copying a list: shallow_copy_of_list = old_list[:]. For copying a dict: shallow_copy_of_dict = dict(old_…

python set clone shallow-copy
Default assignment operator= in c++ is a shallow copy?

Just a simple quick question which I couldn't find a solid answer to anywhere else. Is the default operator= just …

c++ operators shallow-copy