pushed ViewController won't dealloc. which strong reference holds it?

303 views Asked by At

I have a ViewController like below;

All of the delegates are weak, what else can it be a strong reference then ? I can't get it, and the ViewController won't dealloc that is really bad.

2

There are 2 answers

1
Snack Cake On

It's tough to know what is causing the leak without seeing all of the code which may be referring to your controller. However, Apple provides a good tool for hunting this type of problem down with Instruments. Here is a tutorial for using Instruments that may be helpful:

http://www.raywenderlich.com/2696/instruments-tutorial-for-ios-how-to-debug-memory-leaks

Here is Apple's documentation on the topic:

https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/MemoryManagementforYourApp/MemoryManagementforYourApp.html#//apple_ref/doc/uid/TP40004652-CH11-SW1

0
anna On

You just have to believe that there must be some strong references if vc can't get dealloc. Check it again and again.