swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: question about copying agents


From: Marcus G. Daniels
Subject: Re: question about copying agents
Date: 13 Apr 1999 12:58:56 -0700

>>>>> "PJ" == Paul E Johnson <address@hidden> writes:

PJ> What does "shallow" mean, as opposed to "deep"?

A shallow copy is one where references remain references.  If there is an
object referenced in the object that is copied, that referenced will
not be copied, merely the reference will be copied.  I.e., when an instance
of this is shallow copied, there will be one more object in the system:
a copy of the top level MyObject instance.

@interface MyObject
{
  id myInternalObject;
}
@end

A deep copy is where the objects that are referenced are cloned.
In the example above there would be (at least) two objects added
to the system: a copy of the top level MyObject instance and a copy
of the myInternalObject.


                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]