• 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
when to save user-data to disk?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

when to save user-data to disk?


  • Subject: when to save user-data to disk?
  • From: Martin Batholdy <email@hidden>
  • Date: Sat, 07 May 2011 04:12:46 +0200

Hi,

I have a program that saves its data (an array of dictionaries) as a plist in the application support folder
with the writeToFile method from NSFileManager.

Now this array gets manipulated a lot while working with the program.
And currently I save the array to disk every time something in the array get changed.

Now is that bad practice?

Can I also just write the array only once to the disk, that is when the app gets terminated?

But then, what happens when the program crashes or get forced to quit?


thanks for any advice!_______________________________________________

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: when to save user-data to disk?
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Re: Getting mouse cursor position
  • Next by Date: Re: block animation
  • Previous by thread: Does CIImage actually copy CVPixelBuffer's contents?
  • Next by thread: Re: when to save user-data to disk?
  • Index(es):
    • Date
    • Thread