2010-09-11
UIButtonはrelease不要
かなりハマっちゃいました(´Д`;)
簡単な経緯としては
[self.navigationController pushViewController:controller animated:YES];
で画面遷移をやっていて、遷移先から遷移元に戻るときに
「modifying layer that is being finalized」っていうのがコンソールに出て落ちるという現象になりました。
色々と調べてたら、遷移先にあったUIButtonをreleaseしていることが原因だったみたいです。
UIButtonは次のように生成しますが、
button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
これはautoreleaseのインスタンスが返ってくるので、releaseが不要なのでした。
Objective-Cは慣れない上にメモリ管理もあるし、大変です(゚´Д`゚)
ついでにXcodeもまだまだ慣れない・・・
もっと頑張らなきゃー(`・ω・´)
トラックバック - http://d.hatena.ne.jp/STAR_ZERO/20100911/1284220037
リンク元
- 2 http://webcache.googleusercontent.com/search?q=cache:xfxB79Y8ctkJ:d.hatena.ne.jp/STAR_ZERO/20100725/1280060747+android:label+GPS&cd=5&hl=ja&ct=clnk&gl=jp
- 1 http://blog.with2.net/mypage/
- 1 http://blogsearch.google.co.jp/blogsearch?hl=ja&ie=UTF-8&q=macbook+pro+非光沢&btnG=ブログ検索&lr=lang_ja
- 1 http://search.yahoo.co.jp/search?p=Incase+15インチ+Hardshell+Case+for+MacBook+Pro&tid=top_ga1_sa&ei=UTF-8&pstart=1&fr=top_ga1_sa&b=11
- 1 http://www.google.co.jp/search?hl=ja&q=vmware+server2+ライセンスキー&aq=f&aqi=&aql=&oq=&gs_rfai=
- 1 http://www.google.co.jp/search?q=android+LocationListener&hl=ja&source=lnt&tbs=lr:lang_1ja&lr=lang_ja&sa=X&ei=YoaMTMv9IYnCcd3dwbsE&ved=0CAcQpwU
- 1 http://www.google.co.jp/search?q=macbook+pro 非光沢&btnG=検索&hl=ja&client=firefox-a&rls=org.mozilla:ja-JP-mac:official&tbs=blg:1&sa=2
