Nishi Nishi - 17 days ago 6
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

http://screencast.com/t/tIZjknBT

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

First, use this for the annoying warning message: http://jomnius.blogspot.ro/2011/09/declaration-of-struct-sockaddrin-will.html

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

Comments