Re: NSOutlineView blowing stack
Re: NSOutlineView blowing stack
- Subject: Re: NSOutlineView blowing stack
- From: Allan Odgaard <email@hidden>
- Date: Fri, 20 Feb 2004 00:48:09 +0100
On 19. Feb 2004, at 23:53, Tom Harrington wrote:
I'm using an NSOutlineView that, when I call -reloadData, will
sometimes get into a recursive loop of function calls until it runs
out of stack space. [...]
Does the data contain cycles? i.e. a dictionary having a key for a
child array, where each child has a parent key pointing back to the
original dictionary?
At least this will do it -- I am not entirely sure what goes wrong:
comparing dictionaries and arrays (with isEqual:) should be safe, even
when cyclic data appear (because it doesn't do a deep compare unless
the pointers differ), but the NSOutlineView will often do infinite
recursions when handed such data.
Btw: another problem with cyclic data is that you are causing a retain
loop, and thus the data will never be released (because children retain
parents, so neither will ever get a retain count of zero). Though it
shouldn't crash ;)
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.