Re: Workaround for framework leaks?
"Gary L. Wade" <garywade-9iVW/[email protected]> Sun, 15 Aug 2010 16:38:03 -0700
| Newsgroups | gmane.comp.macosx.devel |
|---|---|
| Message-ID | <C88DC86B.2CFAD%[email protected]> |
Hmmm...not a bad idea; I've already defined a wrapper around NSSpeechSynthesizer -objectForProperty:error: to include the expected autorelease, so it probably wouldn't hurt to go all the way down to the guts of the call. On 08/15/2010 4:14 PM, "Kyle Sluder" <[email protected]> wrote: > On Sun, Aug 15, 2010 at 4:00 PM, Gary L. Wade > <garywade-9iVW/[email protected]> wrote: >> There are indeed leaks in the frameworks. I verified at WWDC with one >> engineer (code was looked at) they had chosen to retain a delegate in one >> framework even though delegates generally do not get retained unless >> documented. Also one of the methods in the speech synthesizer returns a >> dictionary of properties (phonemes) you must release even though it's name >> suggests you must retain it yourself if you want it. Unfortunately, I can >> never have a clean analyzer build due to this. If you believe in your case, >> write a bug and possibly use an incident report for a definite solution. > > One way to fool the analyzer is to explicitly call objc_msgSend. > Document it heavily and file a bug asking for the correct analyzer > annotation to be added to the framework header file. > > --Kyle Sluder