Contents

decodeArray(ofObjCType:count:at:)

Decodes an array of count items, whose Objective-C type is given by itemType.

Declaration

func decodeArray(ofObjCType itemType: UnsafePointer<CChar>, count: Int, at array: UnsafeMutableRawPointer)

Discussion

The items are decoded into the buffer beginning at address, which must be large enough to contain them all. itemType must contain exactly one type code. NSCoder’s implementation invokes decodeValue(ofObjCType:at:) to decode the entire array of items.

This method matches an encodeArray(ofObjCType:count:at:) message used during encoding.

For information on creating an Objective-C type code suitable for itemType, see Type Encodings.

Special Considerations

You should not use this method to decode C arrays of Objective-C objects. For historical reasons, returned objects will have an additional ownership reference which you can only relinquish using CFRelease.

See Also

Decoding General Data