Memory Management to NSError

2009-01-06 Thread Dong Feng
How shall we handle the NSError object returned directly or indirectly (through out parameter)? Shall it be released after use? I checked the example code in Apple document but never see a returned NSError object get released. ___ Cocoa-dev mailing

Re: Memory Management to NSError

2009-01-06 Thread Mike Abdullah
You didn't create the error object, so don't release it. Assume it is autoreleased. On 6 Jan 2009, at 02:16, Dong Feng wrote: How shall we handle the NSError object returned directly or indirectly (through out parameter)? Shall it be released after use? I checked the example code in Apple

Re: Memory Management to NSError

2009-01-06 Thread Alexander Spohr
If you did not alloc it you should not release it. That is the rule for ALL objects. atze Am 06.01.2009 um 03:16 schrieb Dong Feng: How shall we handle the NSError object returned directly or indirectly (through out parameter)? Shall it be released after use? I checked the example

Re: Memory Management to NSError

2009-01-06 Thread Sherm Pendley
On Jan 5, 2009, at 9:16 PM, Dong Feng wrote: How shall we handle the NSError object returned directly or indirectly (through out parameter)? Shall it be released after use? I checked the example code in Apple document but never see a returned NSError object get released. Since it's not

Re: Memory Management to NSError

2009-01-06 Thread Ken Thomases
On Jan 5, 2009, at 8:16 PM, Dong Feng wrote: How shall we handle the NSError object returned directly or indirectly (through out parameter)? Shall it be released after use? I checked the example code in Apple document but never see a returned NSError object get released. Others have already

Re: Memory Management to NSError

2009-01-06 Thread Dong Feng
Thank you all for the answers. 2009/1/6 Dong Feng middle.fengd...@gmail.com: How shall we handle the NSError object returned directly or indirectly (through out parameter)? Shall it be released after use? I checked the example code in Apple document but never see a returned NSError object