Memory Management and objects creation via static methods...

2008-03-24 Thread Samvel
Hi, Lots of classes define static methods that create objects for instance: Class NSString: +(id) stringWithString: (NSString *) string; or Class NSArray: +(id) arrayWithObjects: (id) firstObj, ...; I am really confused about next situation and memory management of objects

Re: Memory Management and objects creation via static methods...

2008-03-24 Thread Ken Thomases
Hi, On Mar 24, 2008, at 11:19 PM, Samvel wrote: Lots of classes define static methods that create objects for instance: Class NSString: +(id) stringWithString: (NSString *) string; or Class NSArray: +(id) arrayWithObjects: (id) firstObj, ...; A minor nit-pick about

Re: Memory Management and objects creation via static methods...

2008-03-24 Thread Sherm Pendley
On Tue, Mar 25, 2008 at 12:19 AM, Samvel [EMAIL PROTECTED] wrote: Lots of classes define static methods that create objects for instance: Class NSString: +(id) stringWithString: (NSString *) string; or Class NSArray: +(id) arrayWithObjects: (id) firstObj, ...; I am really

Re: Memory Management and objects creation via static methods...

2008-03-24 Thread Samvel
Sorry for terminology. I came from C++ and still have some problems with it especially calling things in Objective-C way :). Thanks for descriptive answer. Actually I meant to release string in dealloc method of my class. Just was thinking about next question regarding NSNotificationCenter