View Full Version : Does NSCoding keep graph relationships?

Mar 2, 2009, 11:35 AM
I have a World class that has pointers to a Character and a Structure. The Character has a pointer to the Structure. If I have the world decode the Structure and the Character decode the structure, will I end up with one Structure object or two?

I.e., is the decode mechanism smart enough to notice that 2 references in my archive are to the same object?

If not, does anybody have a "best practices" approach to reinstating the relationship?