-------- inherited deep copy and shallow copy

 

When we pass the parameters passed in the parent class has a reference element, we need to consider deep and shallow copy copy.

What is shallow copy of it?

  Shallow copy is the only time when the passed parameter passing reference to the address space, do not open up memory space.

 

What is a deep copy of it?

  Deep copy is: open space and assignments.

 

Guess you like

Origin www.cnblogs.com/see-the-stars/p/10941939.html