Re: 'Build and Analyze' with XCODE 3.2.2

2010-04-26 Thread Kyle Sluder
On Mon, Apr 26, 2010 at 9:24 AM, David Duncan wrote: > FYI "Create" is for functions, "new" is for methods. The analyzer won't > recognize one where the other is proper. There are also adornments you can > use to override the analyzer's understanding, but I can't recall them right > now. They

Re: 'Build and Analyze' with XCODE 3.2.2

2010-04-26 Thread David Duncan
On Apr 24, 2010, at 1:33 PM, Quincey Morris wrote: > Also, you should preferably follow the memory management rules about naming > methods. Either autorelease gregorian before releasing it, or put "Create" > somewhere in your method name. FYI "Create" is for functions, "new" is for methods. Th

Re: 'Build and Analyze' with XCODE 3.2.2

2010-04-24 Thread Scott Cherf
I believe the problem is that you aren't releasing offset or gregorian before you return them. I expect that gregorian retains offset (or copies it and retains the copy without releasing the original). In general, if you aren't don't intend to retain an allocated object, autorelease it and let

Re: 'Build and Analyze' with XCODE 3.2.2

2010-04-24 Thread Quincey Morris
On Apr 24, 2010, at 13:02, John Love wrote: > Here's a sample snippet of my code: > > - (NSDate *)offsetDate:(NSDate *)fromDate > byYears:(int)addYears > byMonths:(int)addMonths > byDays:(int)addDays { > > NSDateCompon

Re: 'Build and Analyze' with XCODE 3.2.2

2010-04-24 Thread Nick Zitzmann
On Apr 24, 2010, at 2:02 PM, John Love wrote: > Here's a sample snippet of my code: > > - (NSDate *)offsetDate:(NSDate *)fromDate > byYears:(int)addYears > byMonths:(int)addMonths > byDays:(int)addDays { > > NSDateCom