Adopted By:
Various OpenStep classes
Declared In:
Foundation/NSObject.h
NSMutableCopying declares one method, mutableCopyWithZone:
, but mutable copying is commonly invoked with the convenience method mutableCopy
. The mutableCopy
method is defined for all NSObjects and simply invokes mutableCopyWithZone:
with the default zone.
See the NSCopying protocol for details on implementing copying behavior.
mutableCopyWithZone:
(NSZone *)zone
Returns a new instance that's a mutable copy of the receiver. Memory for the new instance is allocated from zone, which may be NULL. If zone is NULL, the new instance is allocated from the default zone, which is returned by NSDefaultMallocZone()
. The returned object is implicitly retained by the sender, who is responsible for releasing it. The copy returned is mutable whether the original is mutable or not.
See also:
- copyWithZone:
(NSCopying protocol), - mutableCopy
(NSObject)
Copyright © 1997, Apple Computer, Inc. All rights reserved.