• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSDocument never deallocated with autosave/versions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NSDocument never deallocated with autosave/versions
      • From: Kyle Sluder <email@hidden>
References: 
 >NSDocument never deallocated with autosave/versions (From: Graham Cox <email@hidden>)
 >Re: NSDocument never deallocated with autosave/versions (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Lion : Sandboxing and IKCameraDeviceView
  • Next by Date: Re: NSDocument never deallocated with autosave/versions
  • Previous by thread: Re: NSDocument never deallocated with autosave/versions
  • Next by thread: Re: NSDocument never deallocated with autosave/versions
  • Index(es):
    • Date
    • Thread