re: crash in the carbon event loop

"Mr. George Warner" <[email protected]>
Newsgroups gmane.comp.macosx.devel
Message-ID <[email protected]>
On Thu, 12 Nov 2009 14:57:57 +1300, Emmanuel Quetelard <[email protected]> wrote:
>>  More often than not this is caused by you CFReleasing something that you shouldn't be releasing.

> Actually when I don't release  any event, the crash still there, so it can't be that (or there is something I didn't understand) . 


The only events you should ever release are ones that you create, copy or retain; all events passed to your handlers are released by the OS after your handler returns.

> Can it be a release of something else than an event that could cause this crash?


Yes; Specifically Core Foundation (CF) objects. Look for CFRelease's and make sure the object they're releasing were created, copied or retained by you. If they were passed to you or came from a "get" function then you should only release them if you retained them at some point.

-- 
Enjoy,
George Warner,
Schizophrenic Optimization Scientist
Apple Developer Technical Support (DTS)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.