Re: Xcode Analyze memory misunderstanding

2009-08-27 Thread Clark Cox
I would recommend renaming that method. Per Cocoa conventions, methods that start with "new" should return an object with an outstanding retain count like +alloc... and -copy do (among others). On Thu, Aug 27, 2009 at 3:29 AM, Reza Farhad wrote: > Dear all > > I am running my code through xcode "B

Re: Xcode Analyze memory misunderstanding

2009-08-27 Thread Jonathan del Strother
On Thu, Aug 27, 2009 at 11:29 AM, Reza Farhad wrote: > Dear all > > I am running my code through xcode "Build and Analyze" to check for bugs. > I have the function below which gives me the following error: > > Object with +0 retain counts returned to caller where a +1 (owning) retain > count is exp

Xcode Analyze memory misunderstanding

2009-08-27 Thread Reza Farhad
Dear all I am running my code through xcode "Build and Analyze" to check for bugs. I have the function below which gives me the following error: Object with +0 retain counts returned to caller where a +1 (owning) retain count is expected I can not understand why can anybody enlighten me.