Nishi Nishi - 1 year ago 73
iOS Question

Delegate memory leakage issue in iOS SDK

I have memory leakage issue in my delgate for ios sdk.
Please check the image here

If I am coming back on this view, it is crashing and if I retain it, via [self.delegate retain]; then it wont crash.

Answer Source

First, use this for the annoying warning message:

Second, why do you retain the delegate? I usually have it as nonatomic, retain class property with no need to manually retain it...

The crash probably doesn't have anything to do with this, it's more likely you are trying to access a deallocate object somewhere. My suggestion would be to comment/delete the retain line, enable NSZombies ( How to enable NSZombie in Xcode? ) and then tell us more about the crash

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download