Chasing a memory leak: Notifications and observers.

Hi All. Apologies if I should have posted this over in system frameworks.


I'm super excited about the new memory graph debugging tool. It's given me some insight on an old memory leak bug I've been trying to find for a quite a long time. I'm not quite there yet though and I'm hoping someone can point me in the correct direction.


I have a view controller that is the main window's root controller in an iPad app. I want to discard it and make a new one. Everything works fine except that the old one never deallocs. I've finally caught it in the act, here's the memory graph. My question is: where do I look? This view controller does subcribe to 4 notifications via NSNotificationCenter, but commenting that out doesn't get rid of this retain. To my knowledge i'm not using KVO property observation on this view controller. What else is left?


Thanks everyone for reading.


I couldn't get my image to show up in this post. Here's a screen shot of the memory graph.

http://imgur.com/a/735h4

To my knowledge i'm not using KVO property observation on this view controller.

Well, that wouldn’t matter because KVO retains neither the observer or the observee.

Looking at your picture, what’s the full name of the class at the top left (it’s shown as “CRNotificatio…erReferences”).

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
Chasing a memory leak: Notifications and observers.
 
 
Q