• 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: Archive/Unarchive Problem/Question?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Archive/Unarchive Problem/Question?


  • Subject: Re: Archive/Unarchive Problem/Question?
  • From: Jens Alfke <email@hidden>
  • Date: Thu, 04 Feb 2016 11:21:09 -0800

> On Feb 4, 2016, at 11:02 AM, Dave <email@hidden> wrote:
>
> However, after I unarchive this object, the pNetworkParentNode property is nil.

Is this after the entire object graph has been unarchived, or is it inside your -initWithCoder: method?

> I was wondering about copyWithZone, should I use copy for this?

No! That would make each node’s parent point to a copy of the parent, not the real parent, which would probably be disastrous.

> Meant to Add that pNetworkParentNode is defined as weak - does this make a difference? If I make it strong, it would cause a cycle?

Hm. I don’t know how weak ivars interact with unarchiving. They should work OK, since the unarchiver has a collection that points to every object that’s been unarchived and will keep any of them from getting dealloced, but I”m not sure.

But yeah, if you make that strong you’ll have cycles.

—Jens
_______________________________________________

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: Archive/Unarchive Problem/Question?
      • From: Dave <email@hidden>
    • Re: Archive/Unarchive Problem/Question?
      • From: Dave <email@hidden>
References: 
 >Archive/Unarchive Problem/Question? (From: Dave <email@hidden>)

  • Prev by Date: Archive/Unarchive Problem/Question?
  • Next by Date: Re: Archive/Unarchive Problem/Question?
  • Previous by thread: Archive/Unarchive Problem/Question?
  • Next by thread: Re: Archive/Unarchive Problem/Question?
  • Index(es):
    • Date
    • Thread