Hello to all,
i'm still very new at learning Obj-C and have a question. First, take a look at the NSDictionary reference: http://developer.apple.com/document...s/NSDictionary_Class/Reference/Reference.html
Scroll down to Tasks, and youll see two types of methods: "Creating" an NSDictionary and "Initializaing" an NSDictionary. Both have pretty similar methods. However, I know that the "creating" methods interact with your Autorelease pool, and so you don't have to "release" them; you can simply do [pool drain] at the end of the program.
My question is, why not ALWAYS use the "create" methods? Why would I ever want to "initialize" the object, and have to worry about manually releasing that object separately from the NSAutoreleasePool?
i'm still very new at learning Obj-C and have a question. First, take a look at the NSDictionary reference: http://developer.apple.com/document...s/NSDictionary_Class/Reference/Reference.html
Scroll down to Tasks, and youll see two types of methods: "Creating" an NSDictionary and "Initializaing" an NSDictionary. Both have pretty similar methods. However, I know that the "creating" methods interact with your Autorelease pool, and so you don't have to "release" them; you can simply do [pool drain] at the end of the program.
My question is, why not ALWAYS use the "create" methods? Why would I ever want to "initialize" the object, and have to worry about manually releasing that object separately from the NSAutoreleasePool?