Re: Intermittent crashes in updateTrackingArea from delegate

"Adam R. Maxwell" <[email protected]>
Newsgroups gmane.comp.macosx.devel
Message-ID <[email protected]>
On Jan 29, 2010, at 7:19 AM, Christiaan Hofman wrote:

> 
> On Jan 29, 2010, at 15:35, Jack Nutting wrote:
> 
>> On Fri, Jan 29, 2010 at 3:03 PM, Christiaan Hofman <[email protected]> wrote:
>>> Apparently you were right, with NSZombieEnabled I get a useful log. Thanks a lot! I still find it strange though that this does not lead to serious problems elsewhere. Anyway, I will be safe now and set the delegates and datasources to nil in dealloc.
>> 
>> Yeah, nilling out any delegate pointers to your controller when the
>> controller deallocs is always the right thing to do.  

I've found that dealloc is sometimes too late, so I typically do this in windowWillClose: or a similar notification handler.  YMMV.


> My conclusion is that AppKit must be calling -updateTrackingRects /after/ the window was closed. IMHO that's a bug.

NSView calls -discardCursorRects when removing a view from a window and during -dealloc, so maybe it does something similar with -updateTrackingAreas?
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.