On 14 Mar 2012, at 16:48, Jens Alfke wrote: >> My assumption is that the savePanel will be held on by the block for as long >> as it exists. But now I wonder whether that assumption is correct, and this >> retaining/copying behaviour only happens when the block is copied. > > True, ‘savePanel’ will only be retained by the block when it’s copied. But > the block has to be copied as part of the implementation of the > beginSheetModalForWindow method, because the sheet has to hold onto a > reference to the block to invoke later after the method returns. So the > method has to copy the block and assign it to some state associated with the > sheet. The copied block object will end up retaining savePanel.
Thanks Jens, so I need to look further to track down the crash. This was the most obvious thing I could think of where my own code could be at fault. My hunch though, is that the crash is due to a system framework bug (in NSSavePanel, or, more specifically, in NSRemoteSavePanel). -António -------------------------------------------- I try to take one day at a time, but sometimes, several days attack me all at once! -------------------------------------------- _______________________________________________ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
