The docs for NSUndoManager state for -removeAllActionsWithTarget: that:

"An object that shares an NSUndoManager with other clients should invoke this message in its implementation of dealloc".

There is a problem with this - if the object being dealloced is itself the parameter to an undo invocation, which in anything more complicated than a trivial test case it is likely to be, then Cocoa goes into an infinite loop when it starts discarding these invocations off the bottom of the stack. The undo manager releases the invocation which releases the object, which calls - removeAllActionsWithTarget:self, and boom - it all falls over.

Can someone tell me if this recommendation is still correct, or what? The only way I can stabilize my app is simply not to attempt to do this, but I'm not really sure if there are any bad implications for NOT calling it.

Is it me, or is NSUndoManager really, really fragile?


------
S.O.S.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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