From GNUstepWiki

(Difference between revisions)
Revision as of 23:02, 15 July 2012
Awiebe (Talk | contribs)

← Previous diff
Current revision
Awiebe (Talk | contribs)
Line 27: Line 27:
|Map/Hashtable |Map/Hashtable
|Arbitrary Association,Serializable |Arbitrary Association,Serializable
|} |}
Line 44: Line 40:
*NSString *NSString
-Non plist files may also be serialized with an [[NSKeyedArchiver]].+see also [[NSKeyedArchiver]].
==Weak and Strong== ==Weak and Strong==

Current revision

Collections are any

Class Generic Name Capability Purpose
NSArray Array List / Linked List Rapid Access, Slow Mutation A reizable list of items. NB Each node of the the list is just a reference, the list need not be of a single type.
NSSet Unordered List Slow Access, Rapid Mutation
NSIndexedSet Indexed Unordered List Fast Access, Fast Mutation
NSDictionary Map/Hashtable Arbitrary Association,Serializable


For each immutable class there is a mutable equivalent, to make a collection mutable use "mutableCopy:". Alternatly when creating the object create an instace of the mutable version instead.


Dictionaries may only serialize known classes to plist files, they are:

  • NSDictionary(must cointain only serializable classes)
  • NSNumber
  • NSArray(must cointain only serializable classes)
  • NSString

see also NSKeyedArchiver.

Weak and Strong

Garbage collection and ARC use weak and strong, it gets complicated: read Apple on Garbage Collection Apple on ARC