On 10/27/09 1:57 PM, Greg Parker said:

>NSSpeechRecognizer passes `self` to a void* callback context
>parameter. Under GC it should use CFRetain() to keep itself alive
>until the callback returns, but on Leopard it still used [self
>retain]. You get the crash when GC throws the object away and then the
>callback fires again.
>
>Assuming my diagnosis is correct, I'd recommend using CFRetain() to
>keep each NSSpeechRecognizer alive forever, and recycle them with
>setCommands:/startListening/stopListening. Alternatively just CFRetain
>() and leak them, if they're hard to recycle and you don't allocate
>very many.

Thanks Greg!

I've added a 10.5-only leak.  Alas, we only get a report of this every
few months or so, but hopefully I won't see it again.  I suspect this is
probably the issue however, for one thing, most of us in the office do
not have mics, so our users test this way more than us.

Thanks also to Bill and Jens for their replies.  For the record, I don't
use NSMessagePort nor Distributed Objects, nor do I do any dynamic
loading nor unloading of bundles.

Cheers,

--
____________________________________________________________
Sean McBride, B. Eng                 [email protected]
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to