• 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
Lazy Loading Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Lazy Loading Archive


  • Subject: Lazy Loading Archive
  • From: Graff <email@hidden>
  • Date: Mon, 25 Aug 2008 09:56:27 -0400

I have a large class I'm archiving that I would like to lazy-load. It's basically a wrapper around a NSArray and what I'd like to do is load some instance variables but leave the array archived until a later time in order to save time and memory.

When I implement the NSCoding protocol methods initWithCoder: and encodeWithCoder: is it a bad idea to de-archive the keys that I need and just retain the NSCoder object so that I can later de-archive the NSArray? Is there any problem keeping the NSCoder object around for long periods of time? Is there a better way of doing this?

I'd hate to have to archive two separate objects in order to implement this, one which is the actual class with a placeholder array and then the large array separately, but I guess that's another way to go.
_______________________________________________


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: Lazy Loading Archive
      • From: Graham Cox <email@hidden>
    • Re: Lazy Loading Archive
      • From: "Shawn Erickson" <email@hidden>
  • Prev by Date: Re: *** -[NSSavePanel _blocksActionWhenModal:]: message sent to deallocated instance 0x15a05e50
  • Next by Date: monitoring file system
  • Previous by thread: Re: Accessing Audio Samples in Cocoa
  • Next by thread: Re: Lazy Loading Archive
  • Index(es):
    • Date
    • Thread