• 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
NSPointerArray compact
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSPointerArray compact


  • Subject: NSPointerArray compact
  • From: James Maxwell <email@hidden>
  • Date: Thu, 26 Jul 2012 17:33:44 -0700

Hi All,

I'm using NSPointerArrays to store references for a complex object graph. The nodes themselves are stored in an NSDictionary for archiving, and the pointer arrays are just used to record the interconnectivity of the nodes (it's loopy and complex, which has been causing problems with NSKeyedUnarchiver). What I'm finding is that I'm getting nil references in my pointer arrays after unarchiving (which is a mystery I still have to solve), so I'd like to get rid of the nils before using the graph. However, calling -compact on them doesn't seem to work. No matter what I do, the nils are still in the arrays, and I'm really not sure what else I can do to get rid of them. The objects are instances of a custom class (i.e., not primitives) and I'm initializing with -pointerArrayWithWeakObjects.

Any thoughts appreciated.

J.


James B Maxwell
Composer/Doctoral Candidate
School for the Contemporary Arts (SCA)
School for Interactive Arts + Technology (SIAT)
Simon Fraser University


_______________________________________________

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: NSPointerArray compact
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: iOS Rendering PDFs on a Background Thread
  • Next by Date: cocoa plugin in widget on 10.8 - is spctl a solution?
  • Previous by thread: Re: iOS Rendering PDFs on a Background Thread
  • Next by thread: Re: NSPointerArray compact
  • Index(es):
    • Date
    • Thread