How do I find out what objects points to another object i Xcode Instruments

Posted by Arlaharen on Stack Overflow See other posts from Stack Overflow or by Arlaharen
Published on 2010-04-13T16:56:48Z Indexed on 2010/04/13 17:03 UTC
Read the original article Hit count: 359

Filed under:
|
|
|

I am trying to analyze some code of mine, looking for memory leaks. My problem is that some of my objects are leaking (at least as far as I can see), but the Leaks tool doesn't detect the leaks. My guess is that some iPhone OS object still holds pointers to my leaked objects.

The objects I am talking about are subclasses of UIViewController that I use like this:

MyController *controller = [[MyController alloc] initWithNibName:@"MyController"  
                                                          bundle:nil];
[self.navigationController pushViewController:controller animated:YES];

When these objects are no longer needed I do:

[self.navigationController popViewControllerAnimated:YES];

Without a [controller release] call right now.

Now when I look at what objects that gets created I see a lot of MyController instances that never gets destroyed. To me these are memory leaks, but to the Leaks tool they are not.

Can someone here tell me if there is some way Instruments can tell me what objects are pointing to my MyController instances and thereby making them not count as memory leaks?

© Stack Overflow or respective owner

Related posts about xcode

Related posts about macosx