UIWebView のリリース前にdelegateにnilセットしないと落ちる

UIWebView のリリース前に delegatenil をセットする必要がある
http://www.syuhari.jp/blog/archives/2137

UIWebView のインスタンスdelegate を指定している場合は以下のように release する前に delegatenil をセットする必要があります。

アップルのマニュアルにも以下のように書かれています。
Important: Before releasing an instance of UIWebView for which you have set a delegate, you must first set its delegate property to nil. This can be done, for example, in your dealloc method.
理由は UIWebView のロード処理が別スレッドで行われているために、release 後にデリゲートメソッドを呼ぶ可能性があるためだそうです。


なるほど・・・
webアクセス入れると不安定になるなぁ、
っていう漠然としたものが明確になった。


ん、じゃあNSURLConnectionはどうなんだろう?
あれもdelegate指定して非同期処理やるような。
そして不安定なときあるような。


次使うときに調べよう。