NSPointerArray compact
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