Re: Static Analyzer and Core Foundation

2009-09-19 Thread Jean-Daniel Dupas
Le 19 sept. 2009 à 02:25, Steve Cronin a écrit : Luke; I've adapted the code to accomodate your's and Chris' answer to question 2. Here's the entire method, which now shows not static analyzer issues but I still would like to understand why not. + (NSDictionary *)metadataForFilePath:(NS

Re: Static Analyzer and Core Foundation

2009-09-18 Thread Jens Alfke
On Sep 18, 2009, at 5:25 PM, Steve Cronin wrote: Is this the 'best' this can be? You need to call CFRelease on 'mdi', right after releasing 'arrayRef'. I don't know why the analyzer isn't reporting that as a leak — you could file a bug report. —Jens

Re: Static Analyzer and Core Foundation

2009-09-18 Thread Steve Cronin
Luke; I've adapted the code to accomodate your's and Chris' answer to question 2. Here's the entire method, which now shows not static analyzer issues but I still would like to understand why not. + (NSDictionary *)metadataForFilePath:(NSString *)thisPath { NSDictionary *md = [NSD

Re: Static Analyzer and Core Foundation

2009-09-18 Thread Luke the Hiesterman
There's not enough code here to give a good answer to question 1. Luke On Sep 18, 2009, at 4:39 PM, Steve Cronin wrote: Luke; OK thank-you for that answer to question 2! Any thoughts on question 1? Steve On Sep 18, 2009, at 6:36 PM, Luke the Hiesterman wrote: Line 44 creates 2 objects, one

Re: Static Analyzer and Core Foundation

2009-09-18 Thread Chris Parker
On 18 Sep 2009, at 4:33 PM, Steve Cronin wrote: Alert - potential boneheaded-ness lies ahead - please be gentle. I'll be the first to admit that I'm much happier in ObjC than C… I thought I would try static analysis and see what turned up. On the whole I must say I'm pleased but this one has

Re: Static Analyzer and Core Foundation

2009-09-18 Thread Steve Cronin
Luke; OK thank-you for that answer to question 2! Any thoughts on question 1? Steve On Sep 18, 2009, at 6:36 PM, Luke the Hiesterman wrote: Line 44 creates 2 objects, one goes into the dictRef, the other is not assigned to a variable, but is used only as the second argument to MDItemCopyAt

Re: Static Analyzer and Core Foundation

2009-09-18 Thread Luke the Hiesterman
Line 44 creates 2 objects, one goes into the dictRef, the other is not assigned to a variable, but is used only as the second argument to MDItemCopyAttributes. The object that you create inside that call is never released. Luke On Sep 18, 2009, at 4:33 PM, Steve Cronin wrote: Folks; Ale