Object Copy - Methods of Copying

Methods of Copying

The design goal of most objects is to give the semblance of being made out of one monolithic block even though most are not. As objects are made up of several different parts, copying becomes nontrivial. Several strategies exist to attack this problem.

Consider two objects, A and B, which each refer to two memory blocks xi and yi (i = 1, 2,...). Think of A and B as strings and of xi and yi (i = 1, 2,...) as the characters they contain. There are different strategies for copying A into B.

Read more about this topic:  Object Copy

Famous quotes containing the words methods and/or copying:

    It would be some advantage to live a primitive and frontier life, though in the midst of an outward civilization, if only to learn what are the gross necessaries of life and what methods have been taken to obtain them.
    Henry David Thoreau (1817–1862)

    The young always have the same problem—how to rebel and conform at the same time. They have now solved this by defying their parents and copying one another.
    Quentin Crisp (b. 1908)