iphone - Getting [NSObject description]s for objects holding circular references -


I have an NSDictionary that has many objects in it, including the array of children NSDX, each of them in the @ "Parent" , which is the parent back in NSDition.

This circular reference breaks the ability to inspect the object as a classic call:

  NSLog (@ "% @", [myDictionary description]);  

Would anyone be so good to recommend the workaround to inspect the object?

Can you create the composition of your code on association and the dictionary Instead of relying on the description method, can you print the content manually?

There is a big problem here, if you are adding an object to a dictionary in the dictionary to maintain its content, then it will be retained, and then if you use the dictionary containing the "sub" dictionary If you are adding, then retains his parents. This will likely be in the maintenance cycle and possibly prevent any object being deallocated.

By "Arrow Coke Programming for Mac OS X" by Aaron Hilleagless:

If the object X Object Y keeps, and Y keeps intact, the object is ever deallocated This situation is known as the Maintaining cycle A retaining cycle can deposit large waste of garbage in memory of your application.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -