Release 1.0  Copyright ©1994 by Don Yacktman.  All Rights Reserved.





List (DeepCopy)




Declared In: <misckit/MiscListExtensions.h>



Category Description

This provides the traditional "deep" copy methods for a List class.  Rather than simply copying the objects in the List, or their id pointers, these methods ask a List object to do a "deep" copy of every object in the list.  A deep copy of the List will be a new List containing new, "deep", copies of every single object in the List.  (As opposed to simply copying the id pointers, which would be a "shallow" copy.)  When copying the List's objects, if the objects do not respond to the -deepCopyFromZone: method, then the objects are simply sent the -copyFromZone: message instead.  Note that under NEXTSTEP, the -copyFromZone: method is sometimes a shallow copy and sometimes a deep copy.  If you want better control over memory management you should implement deep and shallow copy methods for your objects; this category aids in the use of such methods.



Method Types

Making deep copies of a List - deepCopy
- deepCopyFromZone:



Instance Methods

deepCopy
-  deepCopy

Returns a copy of the receiving List with "deep" copies of all the objects in that list.

See also:  -copy (List), -copyFromZone: (List), and -deepCopyFromZone:




deepCopyFromZone:

-  deepCopyFromZone:(NXZone *)zone

Returns a copy of the receiving List with "deep" copies of all the objects in that list.  All copies are allocated from the zone zone.

See also:  -copy (List), -copyFromZone: (List), and -deepCopy