Re: NSDocument never deallocated with autosave/versions
Re: NSDocument never deallocated with autosave/versions
- Subject: Re: NSDocument never deallocated with autosave/versions
- From: Graham Cox <email@hidden>
- Date: Wed, 30 May 2012 22:13:57 +1000
On 30/05/2012, at 8:55 PM, Kyle Sluder wrote:
>> Key point: If I disable autosaving for my document class, the document is deallocated as expected.
>
> Do you override any of the saving methods and fail to call their completion handlers in the Don't Save case?
No; I only override the fileWrapper... and readFileWrapper... methods. I'm not doing anything tricky with the standard flow control of save/dont save/cancel.
I'm going to put together a clean simple NSDocument-based test case to check that the bug can be reproduced in that case.
> I guess you should implement -[NSDocument close] to do your cleanup then.
Indeed, I have done. But that doesn't fix the bug, it only mitigates its effects. A leak is still there, and it's a potentially quite large one, since NSDocument owns my data model.
--Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden