Hatena::Groupiphone-dev

Ni chicha, ni limona - 平均から抜けられない僕

2010-03-30

[NSAutoReleasePool][CFRunLoop] NSAutoReleasePoolの管理者は誰であるべきか 19:03  [NSAutoReleasePool][CFRunLoop] NSAutoReleasePoolの管理者は誰であるべきか - Ni chicha, ni limona - 平均から抜けられない僕 を含むブックマーク はてなブックマーク -  [NSAutoReleasePool][CFRunLoop] NSAutoReleasePoolの管理者は誰であるべきか - Ni chicha, ni limona - 平均から抜けられない僕  [NSAutoReleasePool][CFRunLoop] NSAutoReleasePoolの管理者は誰であるべきか - Ni chicha, ni limona - 平均から抜けられない僕 のブックマークコメント

昨晩、スレッドを使いこなすために「NSAutoReleasePoolをどこで作るか」というのを調べていました。


プロジェクトを新規作成するとmain()内に以下のコードが記述されています。

    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    int retVal = UIApplicationMain(argc, argv, nil, nil);
    [pool release];
    return retVal;

これに対し、「なぜランループ内ではなく、main()に直接書いてあるのだろう?これだと記入漏れやうっかり削除もあり得るのでは?」と思ったわけです。

そこでTwitterで呟いたところ、投稿が物書堂さんとnorio_nomuraさん、cqa02303さんの目に留まり、色々とアドバイスをしてもらいました。


そのときの内容をとTogetterで纏めましたので、ここにリンクを貼っておきます。


 NSAutoReleasePoolの作成&解放タイミングについて - Togetter


最後はnatsun_happyさん*1にも混じっていただいたおかげで、うまい具合にまとめることが出来ました。

皆様、ありがとうございました。


TLで出てきたTips

上記タイムラインで出てきたTipsをここにも記しておきます。


NSAutoReleasePoolの中味をログ出力させる

クラスメソッド[NSAutoReleasePool showPools]を使います。Unpublished Methodなのでビルド時に警告が出ますが問題はありません(Objective-Cはすごいですね)。

これにより以下の情報を確認できます。

  • NSAutoReleasePoolが何層構造になっているか
  • 各階層では何のクラスのオブジェクトが保持されているか

あまり詰まっているようだとメモリ活用として問題があると思いますので、参考にすると便利です。

NSAutoReleasePoolが作られていないときにautoreleaseされるオブジェクトがあるかどうかの識別方法

自分の作ったスレッドでプールがきちんと使われているか心配になったときは、ログに

…autoreleased with no pool in place - just leaking

と出力されていないかをチェックしてみてください。もしプールを用意していなければ、autoreleaseしたタイミングで上の文字列が問題のクラス名と共に出力されます。

通常は設計の時点でこんな不具合は潰されているべきですけれど・・・。


MetronomePROに関するお詫び 19:03  MetronomePROに関するお詫び - Ni chicha, ni limona - 平均から抜けられない僕 を含むブックマーク はてなブックマーク -  MetronomePROに関するお詫び - Ni chicha, ni limona - 平均から抜けられない僕  MetronomePROに関するお詫び - Ni chicha, ni limona - 平均から抜けられない僕 のブックマークコメント

最後に、お詫びです。


拙作のメトロノームアプリMetronomePRO(iTunesが開きます)」ですが、現行の1.3で見られる幾つかの不具合を修正した1.3.1のレビューがなかなか終わりません。現在5日目に突入です。


アップルiPadアプリ審査に注力しているせいかなとも思いますが、ユーザーの皆様、どうぞもう少しだけ修正版のリリースをお待ちください。

ご迷惑をおかけいたします。

*1:CoreData周りにとてもお詳しい方です。

GerardmupGerardmup2019/01/30 03:07mayavanrosendaal.com
cialis without a doctor's prescription cialis without prescription cialis without prescription online buy cialis without prescription

JospehGafJospehGaf2019/01/30 10:20cialis pharm
comprar cialis online entrega urgente
what is the price for cialis
cialis drug store price

cialis 20mg directions
lilly cialis without prescription
cialis in germany
cialis in sam club
https://stowe365.com/#Buy-Cialis

JospehGafJospehGaf2019/01/30 19:46buy cialis.com
cialis original
best price cialis online
cialis australia supplyers

30mg cialis
buy cialis brand canada
philly cialis
store cialis in refrigerator
https://stowe365.com

JospehGafJospehGaf2019/01/31 05:39over-the-counter-cialis-paid-by-paypal
cialis 10mg tablets price
why has the price of cialis gone up
discount cialis online canada

generic cialis tadalafil reviews
cialis online funziona
genuine cialis online australia
buy cialis overnight
https://stowe365.com

JospehGafJospehGaf2019/01/31 16:18generic generic cialis pills 25 mg
buy cialis 5mg online pharmacy
rx ok biz products cialis
cialis 5mg daily tab more than 1

buy generic cialis "on line"
cialis prescription insurance coverage
cialis professional vs. super active
dove comprare cialis generico forum
https://stowe365.com/#Buy-Cialis

JospehGafJospehGaf2019/02/01 04:25lowes online price for cialis
kamagra cialis kaufen
cialis online withouth prescription
cialis treatment

cialis bill me later
import cialis
to buy cialis from ireland
cialis daily online
https://stowe365.com/#Buy-Cialis

JospehGafJospehGaf2019/02/01 23:20get cialis pills
order female cialis
cialis tabs
what is the retail price of cialis

cialis over night
cialis online pagamento contrassegno
cialis over internet
natural eshop cialis danmark
https://stowe365.com

DavidWewDavidWew2019/02/03 03:05canadian pharmacy buy cialis professional
cialis 40 mg chocolate video com
<a href="http://kaivanrosendaal.com">Buy Cheap Cialis</a>
cialis jelly
buying cialis online review
[url=http://kaivanrosendaal.com]cialis for daily use[/url]
when does cialis kick in
when will cialis go off patent
http://kaivanrosendaal.com/#Buy-Cheap-Cialis

DavidWewDavidWew2019/02/03 12:55cheapest price for cialist in canada
product team cialis getting ready to market case analysis
<a href="http://kaivanrosendaal.com/">buy cialis online</a>
cialis france livraison 48 heures
pharmacy bill cialis
[url=http://kaivanrosendaal.com]viagra vs cialis[/url]
costo cialis originale 20 mg
health benefits of cialis
http://kaivanrosendaal.com/#buy-cialis

DavidWewDavidWew2019/02/04 02:44best canadian pharmacy for cialis
cialis usa online paypal
<a href="http://kaivanrosendaal.com/">Cheap Cialis</a>
cialis overnite
qualcuno ha comprato cialis online
[url=http://kaivanrosendaal.com]cialis vs viagra[/url]
cialis para venta al mayoreo
is cialis by prescription only
http://kaivanrosendaal.com/#what-is-cialis

DavidWewDavidWew2019/02/04 11:00comprar cialis barato mastercard
which cialis is more potent 20 or 40 mg
<a href="http://kaivanrosendaal.com/">generic cialis</a>
xm radio generic cialis
cialis daily dosage
[url=http://kaivanrosendaal.com]Buy Cheap Cialis[/url]
try cialis
best price brand cialis
http://kaivanrosendaal.com/#cialis-generic

DavidWewDavidWew2019/02/04 22:32japanese cialis baolong
cialis price europe 345
<a href="http://kaivanrosendaal.com/">viagra vs cialis</a>
cheapest cialis pills
quanto costa cialis 20 mg farmacia
[url=http://kaivanrosendaal.com/]Cheap Cialis[/url]
cialis ersatz
cipla cialis review
http://kaivanrosendaal.com/#cialis-canada

DavidWewDavidWew2019/02/05 10:47cialis sin receta medica
comprar cialis 5mg online
<a href="http://kaivanrosendaal.com">cialis cost</a>
brand name cialis canada
cialis suppliers
[url=http://kaivanrosendaal.com/]generic cialis tadalafil[/url]
online apotheke cialis kaufen
cialis shop mit mastercard
http://kaivanrosendaal.com/#cialis-from-canada

DavidWewDavidWew2019/02/05 21:31cialis apotheke holland
cialis 5mg best price australia
<a href="http://kaivanrosendaal.com/">viagra vs cialis</a>
cialis without prescriptions usa
acquisto cialis senza ricetta online
[url=http://kaivanrosendaal.com]cialis official site[/url]
cialis laboratoire lilly
order cialis 10mg cheap in us
http://kaivanrosendaal.com/#Buy-Cheap-Cialis

DavidWewDavidWew2019/02/06 06:03generic cialis user reviews
cialis 5mg price in dubai
<a href="http://kaivanrosendaal.com">cialis alternative</a>
ebay cheap cialis
order brand name cialis online
[url=http://kaivanrosendaal.com/]cialis free trial[/url]
cialis 5mg lilly
cialis shipped from canada
http://kaivanrosendaal.com/#buy-cialis

JasonjagJasonjag2019/03/01 06:02cialis pills shanghaishop apotheke cialis Buy Cialis 40mg <a href="http://xcialis20mg.com">Buy Cialis 20mg</a>

JasonjagJasonjag2019/03/01 14:29cialis viagara discussion forumcialis online flashback Cialis 20 mg <a href="http://xcialis20mg.com">Buy Cialis 20 mg</a>

JasonjagJasonjag2019/03/01 23:15cialis paypal australiaretail price of cialis 20mg Buy Cialis 40 mg <a href="http://xcialis20mg.com">xcialis20mg.com</a>

JasonjagJasonjag2019/03/02 07:42cialis usa over the counterorder liquid cialis cheap cialis <a href="http://xcialis20mg.com">http://xcialis20mg.com</a>

JasonjagJasonjag2019/03/03 03:445mg cialis reviewscheap cialis without prescription Buy Cialis 60mg <a href="http://xcialis20mg.com">xcialis20mg.com</a>

GeorgeSemGeorgeSem2019/03/29 03:15aziende slot machine bufala slot machine app per svuotare slot machine <a href="http://hlaastmu.com/#slot">giochi gratuiti da scaricare gratis</a> concessione slot machine slot machine gioco gratis online d'alema slot machine
halloween slot machine free slot machine che pagano slot machine gratis online [url=http://hlaastmu.com/#slot]slot machines gratis[/url]

http://hlaastmu.com

GeorgeSemGeorgeSem2019/03/29 07:35condonati slot machine 98 miliardi condonati alle slot machine slot machine da bar bonus <a href="http://www.hlaastmu.com">giochi gratis slot machine 5 rulli</a> poker slot machine online gratis nuovi giochi slot machine gratis slot machine free online
guadagni slot machine slot machine grafica platinum quick hit slot machine free play download [url=http://hlaastmu.com/]giochi gratis nuovi 2016[/url]

http://hlaastmu.com

GeorgeSemGeorgeSem2019/03/29 11:51condono alle slot machine giocare gratis senza scaricare slot machine mappa slot machine <a href="http://hlaastmu.com">slot machine da bar</a> slot machine galline dalle uova d'oro attivitГ  slot machine girl slot machine
classic slot machine gratis ultime slot machine da bar slot machine animation [url=http://hlaastmu.com/#slot]video slot gratis[/url]

http://hlaastmu.com

GeorgeSemGeorgeSem2019/03/29 16:14slot machine 2x3x4x5x slot machine reggio calabria slot machine rubate <a href="http://hlaastmu.com/#slot">gioco gratis</a> sisal slot machine slot machine italiane game of thrones slot machine
come aprire una sala slot machine admiral slot machine free games great owl slot machine online [url=http://hlaastmu.com/]giochi nuovi gratis 2017[/url]

http://hlaastmu.com

GeorgeSemGeorgeSem2019/03/29 20:42slot machine gatis slot machine free vector noleggio slot machine bar <a href="http://hlaastmu.com">giochi gratis slot mascin</a> noleggio slot machine palermo cash out slot machine lucky casino slot machine
slot machine gratis tutte componenti elettronici slot machine t slot cutting on milling machine [url=http://hlaastmu.com/#slot]giochi grati[/url]

http://hlaastmu.com

GeorgeSemGeorgeSem2019/03/30 01:19associazione noleggiatori slot machine odds of slot machine video slot machine gratis senza scaricare <a href="http://hlaastmu.com/">tutti i giochi gratis del mondo</a> bally slot machine models slot machine app free download registrazione contabile incassi slot machine
emp jammer slot machine app android best slot machine app on iphone slot machine gratis nuove [url=http://hlaastmu.com/#slot]giochi slot machine gratis[/url]

http://hlaastmu.com

GeorgeSemGeorgeSem2019/03/30 05:54slot machine premium jammer slot machine regolamento aams slot machine <a href="http://hlaastmu.com/#slot">google giochi gratis</a> free slot machine games for pc download com'ГЁ fatta una slot machine slot machine tutti i tipi
tassa slot machine 2015 slot machine games apps jack and the beanstalk slot machine [url=http://www.hlaastmu.com]slot machine gratis gioco[/url]

http://hlaastmu.com

GeorgeSemGeorgeSem2019/03/30 10:19slot machine slot machine trucchi slot machine pokemon trucchi slot machine monster house <a href="http://www.hlaastmu.com">giochi di slot</a> umberto rapetto slot machine disegno slot machine slot machine online seed
assicurazione furto slot machine condono concessionari slot machine slot machine zorro gratis [url=http://hlaastmu.com/#slot]giochi on line free[/url]

http://hlaastmu.com

GeorgeSemGeorgeSem2019/03/30 14:41voglio giocare alle slot machine gratis slot machine gratis faraone slot machine hack online casino <a href="http://www.hlaastmu.com">giocare gratis slot</a> christmas slot machine payout slot machine slot machine gratis da bar re mida
cleopatra 11 slot machine slot machine trucchi bar offerte di lavoro slot machine [url=http://hlaastmu.com/]slot online gratis senza registrazione[/url]

http://hlaastmu.com

GeorgeSemGeorgeSem2019/03/31 18:45emp slot machine jammer marim slot machine slot machine gallina gratis online <a href="http://hlaastmu.com/">giochi gratis slot mascin</a> triple 7 slot machine cheats super sevens slot machine app cinese slot machine
come ingannare le slot machine orari slot machine problemi con le slot machine [url=http://hlaastmu.com]star casino[/url]

http://hlaastmu.com

GeorgeSemGeorgeSem2019/03/31 22:53svuotare slot machine eye of horus slot machine free noleggio slot machine la spezia <a href="http://hlaastmu.com/">giochi gratis flash</a> fruit slot machine free online cirsa slot machine emp slot machine jammer
pokemon blue slot machine gallina slot machine slot machine rtp [url=http://hlaastmu.com/]giochi slot[/url]

http://hlaastmu.com

GeorgeSemGeorgeSem2019/04/01 02:57slot machine sfinge slot machine taktik tecnico slot machine milano <a href="http://hlaastmu.com/">giochi da scaricare gratis</a> slot machine online android apk normativa slot machine 2015 costruire slot machine
rulli slot machine video slot machine online slot machine faraone [url=http://hlaastmu.com/#slot]giochi slot gratis[/url]

http://hlaastmu.com

GeorgeSemGeorgeSem2019/04/01 07:03come vincere alle slot machine al casino bar e slot machine sala giochi slot machine franchising <a href="http://hlaastmu.com/#slot">giochi da giocare gratis</a> challenger slot machine cirsa slot machine via le slot machine dai bar
limitazione orari slot machine marim slot machine sisal slot machine on line [url=http://hlaastmu.com/]slot machine gratis da scaricare[/url]

http://hlaastmu.com

GeorgeSemGeorgeSem2019/04/01 11:12blocchi cad slot machine slot machine monza slot machine senza scaricare <a href="http://hlaastmu.com/#slot">giochi gratis nuovi 2016</a> multi slot mortising machine how to beat book of ra slot machine slot machine antica
slot machine di cartone slot machine dei vampiri slot machine guadagno [url=http://www.hlaastmu.com]slotgratis[/url]

http://hlaastmu.com

GeorgeSemGeorgeSem2019/04/01 15:29legge sulle slot machine 2015 mega cash slot machine slot machine emilia romagna <a href="http://hlaastmu.com">tutti i giochi del mondo gratis</a> slot machine winner 10 million slot machine gratis pompei quanto si guadagna con le slot machine
slot machine mago cherry master slot machine download slot machine aloha [url=http://www.hlaastmu.com]slot gratis senza registrazione[/url]

http://hlaastmu.com

GeorgeSemGeorgeSem2019/04/01 19:54slot machine vincita massima slot machine far west pagamento slot machine <a href="http://hlaastmu.com">slot machines gratis</a> slot machine odds vegas hackerare slot machine on line slot machine lucky lady charm gratis
cha cha cha slot machine slot machine aziende jammer slot machine ebay [url=http://hlaastmu.com/]gioco macchine[/url]

http://hlaastmu.com

AdamsClamsAdamsClams2019/05/19 20:52Hi savings lover!

What can you buy online? Yes, almost everything! So, for everything you can get a significant percentage of cashback from our service!

Our regular users know that using a <a href=http://bit.ly/2UwSyfW>cashback service cashback service</a> you can not only profitably buy clothes and equipment, but also save money on purchases of household chemicals, cosmetics and the mass of other categories of goods. And with us you can get a cashback with each order of your favorite food!

We are constantly expanding our list of partners among online stores, choosing the most popular of them, so that you don’t have to limit yourself to choosing!

Choose from thousands of brands and a million products of various categories! And, of course, get cashback from each order! Visit our website right now and reduce your spending on purchases!

Save up to 40% from each purchase !. Use <a href=http://bit.ly/2UwSyfW>cashback service cashback service</a>s. Introducing the largest <a href=http://bit.ly/2DoqlCs>cashback service cashback service</a> in the world!
- 2078 popular online cashback stores
- 969 stores with increased cashback
Today, bank cards are not only a way to store money and non-cash payments, but also a very interesting financial instrument, opening a number of convenient and profitable functions for their owners.
Cashback has become a favorite subject in many of the features of related cards.
Fast cash withdrawal in a convenient way! http://bit.ly/2VYijaH