Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ARTのメモリ管理
Search
haru067
April 25, 2015
Programming
8
15k
ARTのメモリ管理
haru067
April 25, 2015
Tweet
Share
More Decks by haru067
See All by haru067
Jetpack Compose: 効果的なComposable関数のAPI設計
haru067
2
6.2k
いかにしてアプリの起動時間を改善するか
haru067
3
2k
REALITY Androidにおけるマルチモジュール移行
haru067
0
1.3k
Immutable data holder
haru067
1
1.1k
Other Decks in Programming
See All in Programming
かんたんデザイン編集やってみた~「完全に理解した」までの道のり~
morit4ryo
1
130
ブラウザ単体でmp4書き出すまで - muddy-web - 2024-12
yue4u
0
200
暇に任せてProxmoxコンソール 作ってみました
karugamo
1
560
Effective Signals in Angular 19+: Rules and Helpers @ngbe2024
manfredsteyer
PRO
0
100
Recoilを剥がしている話
kirik
4
6k
我々のデザインシステムは Chakra v3 にアップデートします
shunya078
2
3k
Amazon Aurora Serverless v2のアプデと、Amazon Aurora PostgreSQL Limitless DatabaseのGAについて
satoshi256kbyte
0
110
iOS18とヘルスケアの睡眠対応
takuyaosawa
0
100
Full stack testing :: basic to basic
up1
1
910
eBPF Deep Dive: Architecture and Safety Mechanisms
takehaya
12
1.3k
Thoughts and experiences on Rust and TypeScript
unvalley
2
220
Keeping it Ruby: Why Your Product Needs a Ruby SDK - RubyWorld 2024
envek
0
130
Featured
See All Featured
RailsConf 2023
tenderlove
29
920
Imperfection Machines: The Place of Print at Facebook
scottboms
266
13k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
17
2.2k
Code Reviewing Like a Champion
maltzj
520
39k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
27
2.1k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Transcript
"35ͷϝϞϦཧ %SPJE,BJHJ!IBSV
ࣗݾհ ˔ 5XJUUFSΫϥΠΞϯτ 4IPPUJOH4UBSͷ։ൃऀ !IBSV
ࣗݾհ ˔ 5XJUUFSΫϥΠΞϯτ 4IPPUJOH4UBSͷ։ൃऀ ʢͨ·ʹਅ໘ͳΛʣ !IBSV
"OESPJEͷ($ͷྺ࢙ Y %BMWJL7. "35
"OESPJEͷ($ͷྺ࢙ 'SPZP ˔ ϚʔΫεΠʔϓ($ ˔ ($தΞϓϦέʔγϣϯ͕ఀࢭͯ͠͠·͏ ʢ458ɼ4UPQ5IF8PSMEʣ Y
%BMWJL7. "35
"OESPJEͷ($ͷྺ࢙ (JOHFSCSFBE ˔ .PTUMZ$PODVSSFOU($ ˔ ϚʔΫεΠʔϓ($ΛΞϓϦέʔγϣϯͱ ΄΅ฒߦʹ࣮ߦɽఀࢭ࣌ؒେ͖͘վળ Y
%BMWJL7. "35
"OESPJEͷ($ͷྺ࢙ Y*$4 +FMMZ#FBO ˔ େ͖ͳมߋͳ͠ ˔ .PTUMZ$PODVSSFOU($ ʢฒߦϚʔΫεΠʔϓ($ʣ
Y %BMWJL7. "35
"OESPJEͷ($ͷྺ࢙ ,JULBU ˔ "35ͳΔϥϯλΠϜ͕ग़ݱ ˔ σϑΥϧτ·ͩ%BMWJL7. Y
%BMWJL7. "35
"OESPJEͷ($ͷྺ࢙ -PMMJQPQ ˔ "35͕σϑΥϧτʹɼ%BMWJLരൃ࢛ࢄ ˔ ϥϯλΠϜ͕ସΘͬͯ($ͱ͔৭ʑͱมΘͬͨ Y
%BMWJL7. "35
Կ͕มΘͬͨͷ͔ʁ
ฒߦ($ͷఀࢭ࣌ؒ
%BMWJL7. ˔ ϧʔτεΩϟϯͱ࠶ϚʔΫͰΞϓϦ͕ఀࢭ͢Δ "35 ˔ ϧʔτεΩϟϯͱ࠶ϚʔΫͷҰ෦Λฒߦʹॲཧ ͕͜͜มΘͬͨɿฒߦ($ͷఀࢭՕॴ ϧʔτ εΩϟϯ ϚʔΫ
࠶ϚʔΫ εΠʔϓ ϧʔτ εΩϟϯ ϚʔΫ ࠶ϚʔΫ εΠʔϓ
%BMWJL7. ˔ ϧʔτεΩϟϯͱ࠶ϚʔΫͰΞϓϦ͕ఀࢭ͢Δ "35 ˔ ϧʔτεΩϟϯͱ࠶ϚʔΫͷҰ෦Λฒߦʹॲཧ ͕͜͜มΘͬͨɿฒߦ($ͷఀࢭՕॴ ϧʔτ εΩϟϯ ϚʔΫ
࠶ϚʔΫ εΠʔϓ ϧʔτ εΩϟϯ ϚʔΫ ࠶ϚʔΫ εΠʔϓ dϛϦඵ͙Β͍
%BMWJL7. ˔ ϧʔτεΩϟϯͱ࠶ϚʔΫͰΞϓϦ͕ఀࢭ͢Δ "35 ˔ ϧʔτεΩϟϯͱ࠶ϚʔΫͷҰ෦Λฒߦʹॲཧ ͕͜͜มΘͬͨɿฒߦ($ͷఀࢭՕॴ ϧʔτ εΩϟϯ ϚʔΫ
࠶ϚʔΫ εΠʔϓ ϧʔτ εΩϟϯ ϚʔΫ ࠶ϚʔΫ εΠʔϓ
%BMWJL7. ˔ ϧʔτεΩϟϯͱ࠶ϚʔΫͰΞϓϦ͕ఀࢭ͢Δ "35 ˔ ϧʔτεΩϟϯͱ࠶ϚʔΫͷҰ෦Λฒߦʹॲཧ ͕͜͜มΘͬͨɿฒߦ($ͷఀࢭՕॴ ϧʔτ εΩϟϯ ϚʔΫ
࠶ϚʔΫ εΠʔϓ ϧʔτ εΩϟϯ ϚʔΫ ࠶ϚʔΫ εΠʔϓ ϛϦඵ͙Β͍
"35ͷฒߦ($εΰΠʂ
ฒߦ͡Όͳ͍΄͏ʁ ˔ 458($ ˔ MPHDBUʹग़ͯ͘Δ($@'03@"--0$͜Ε ˔ ϝϞϦྖҬ͕ෆ͢Δͱൃੜ ˔ ฏؾͰΞϓϦ͕ඵࢭ·ͬͨΓ͢Δ ൃੜ͢Δͱ໌Β͔ʹϠό͍
ฒߦ͡Όͳ͍΄͏ʁ ˔ 458($ ˔ MPHDBUʹग़ͯ͘Δ($@'03@"--0$͜Ε ˔ ϝϞϦྖҬ͕ෆ͢Δͱൃੜ ˔ ฏؾͰΞϓϦ͕ඵࢭ·ͬͨΓ͢Δ ൃੜ͢Δͱ໌Β͔ʹϠό͍
ϩάݟΔͱׂͱൃੜͯͨ͠Γ͢Δ
ʀʅЧʆ
458($ͷൃੜݪҼͦͷ̍ ˔ அยԽʹΑΔϝϞϦׂͯͷࣦഊ ʮۭ͍ͯΔͱ͜Ζνϥϗϥ͋Δ͚ͲೖΒͳ͍ʯ ˔ ΞϓϦέʔγϣϯ͝ΈͷճऩΛͨͳ͍ͱ͍ ͚ͳ͍ ώʔϓ ۭ͖ྖҬ ༻த
PCK ʁ
ʁ
σϑϥά͢Ε͍͍͡ΌΜ ˔ σϑϥάʹੌ͍͕͔͔࣌ؒΔ ˔ ώʔϓΛԿεΩϟϯ͢Δඞཁ͕͋Δ ˔ σϑϥά͍ͯ͠ΔؒΞϓϦέʔγϣϯ͕ఀࢭ ˔ ͱͯͭΒ͍
"35Ͳ͏ͯ͠Δͷ ˔ େ͖͍ΦϒδΣΫτ͕ॾѱͷࠜݯ ώʔϓ ۭ͖ྖҬ ༻த PCK
"35Ͳ͏ͯ͠Δͷ ˔ େ͖͍ΦϒδΣΫτ͕ॾѱͷࠜݯ ʮσϒిंʹΔͳʯ ώʔϓ ۭ͖ྖҬ ༻த PCK
͕͜͜มΘͬͨɿஅยԽରࡦ ˔ େ͖͍ΦϒδΣΫτΛผͷྖҬͰཧ ʮσϒઐ༻ं྆Λͭ͘Ζ͏ʯ ˔ -BSHF0CKFDU4QBDFʢ-04ʣ ௨ৗ༻ ۭ͖ྖҬ ༻த Ͱ͔͍ͭΒʢେ͖Ίͷྻͱ͔ʣ༻
"35͕ΜͬͯΔ
458($ͷൃੜݪҼͦͷ̎ ˔ ϝϞϦׂ͕ܹͯͯ͘͠ฒߦ($͕͍͔ͭͳ͍ ΞϓϦ࣮ߦ
458($ͷൃੜݪҼͦͷ̎ ˔ ϝϞϦׂ͕ܹͯͯ͘͠ฒߦ($͕͍͔ͭͳ͍ ฒߦ($ ΞϓϦ࣮ߦ
458($ͷൃੜݪҼͦͷ̎ ˔ ϝϞϦׂ͕ܹͯͯ͘͠ฒߦ($͕͍͔ͭͳ͍ ฒߦ($ ΞϓϦ࣮ߦ ΞϓϦ࣮ߦ
458($ͷൃੜݪҼͦͷ̎ ˔ ϝϞϦׂ͕ܹͯͯ͘͠ฒߦ($͕͍͔ͭͳ͍ ฒߦ($ ΞϓϦ࣮ߦ ΞϓϦ࣮ߦ ฒߦ($
458($ͷൃੜݪҼͦͷ̎ ˔ ϝϞϦׂ͕ܹͯͯ͘͠ฒߦ($͕͍͔ͭͳ͍ ฒߦ($ ΞϓϦ࣮ߦ ΞϓϦ࣮ߦ ฒߦ($ ϝϞϦਚ͖·ͨ͠
458($ͷൃੜݪҼͦͷ̎ ˔ ϝϞϦׂ͕ܹͯͯ͘͠ฒߦ($͕͍͔ͭͳ͍ ฒߦ($ ΞϓϦ࣮ߦ ΞϓϦ࣮ߦ ฒߦ($ ϝϞϦਚ͖·ͨ͠ 458($
458($ͷൃੜݪҼͦͷ̎ ˔ ϝϞϦׂ͕ܹͯͯ͘͠ฒߦ($͕͍͔ͭͳ͍ ฒߦ($ ΞϓϦ࣮ߦ ΞϓϦ࣮ߦ ฒߦ($ ϝϞϦਚ͖·ͨ͠ 458($
ฒߦ($ૣΊʹΕ͍͍͡ΌΜ ˔ ͍͍ͩͨ͋ͬͯΔ ˔ "35%BMWJLΑΓݡ͘ฒߦ($Λ࣮ߦͯ͠Δ ˔ جຊతʹۭ͖ྖҬ͕ҰఆΛ͑ͨΒ($ ˔ "35ϝϞϦׂͯසͱ͔ߟྀͭͭ͠($
"35͕ΜͬͯΔ
"35ͷఀࢭ࣌ؒ·ͱΊ ˔ ฒߦ($ͰɼΞϓϦΛఀࢭ্ͤͨ͞ͰͷॲཧΛݮ ˔ 458($ͷൃੜසΛ͑Δ ˔ -BSHF0CKFDU4QBDFʹΑΔஅยԽରࡦ ˔ ΑΓ͜·ʹɼલͬͯฒߦ($ ฏۉఀࢭ࣌ؒΛ͘
࣌ؒͷఀࢭΛ͑Δ
ΊͰͨ͠ʁ
˔ 458($ͷൃੜ͑ΒΕΔ ˔ εϧʔϓοτʢ࣮ߦ࣌ؒʣѱ͘ͳΔ ΉΈʹฒߦ($Λ࣮ߦ͍͍ͯ͠ͷ͔ʁ
˔ 458($ͷൃੜ͑ΒΕΔ ˔ εϧʔϓοτʢ࣮ߦ࣌ؒʣѱ͘ͳΔ ΉΈʹฒߦ($Λ࣮ߦ͍͍ͯ͠ͷ͔ʁ ࣮ߦ࣌ؒͬͪ͜ͷ΄͏͕͍
εϧʔϓοτ
͕͜͜มΘͬͨɿฒྻ($ ˔ ($ͷॲཧΛฒྻ࣮ߦͯ͠ߴԽ ˔ ϚϧνίΞ$16ࡌ͕૿͑ͯΔ͜ͱͩ͠ ˔ ͷ($ʹ͔͔Δ࣌ؒΛॖ ˔ ࠶ϚʔΫͷఀࢭ͢Δॲཧ͘ͳͬͯخ͍͠ ϧʔτ
εΩϟϯ ϚʔΫ ࠶ϚʔΫ εΠʔϓ
͕͜͜มΘͬͨɿฒྻ($ ˔ ($ͷॲཧΛฒྻ࣮ߦͯ͠ߴԽ ˔ ϚϧνίΞ$16ࡌ͕૿͑ͯΔ͜ͱͩ͠ ˔ ͷ($ʹ͔͔Δ࣌ؒΛॖ ˔ ࠶ϚʔΫͷఀࢭ͢Δॲཧ͘ͳͬͯخ͍͠
͕͜͜มΘͬͨɿੈผ($ ˔ ଟ͘ͷΦϒδΣΫτ໋Ͱ͋Δɼͱ͍͏ԾઆΛ ར༻ͨ͠($ ˔ 4UJDLZNBSLCJUT($ ˔ લճͷ($Ҏ߱ʹ࡞ΒΕͨ͝Έ͚ͩճऩ ($ ($
͕͜͜มΘͬͨɿੈผ($ ˔ ଟ͘ͷΦϒδΣΫτ໋Ͱ͋Δɼͱ͍͏ԾઆΛ ར༻ͨ͠($ ˔ 4UJDLZNBSLCJUT($ ˔ લճͷ($Ҏ߱ʹ࡞ΒΕͨ͝Έ͚ͩճऩ ($ ($
($ର ($ର֎
͕͜͜มΘͬͨɿੈผ($ ˔ ଟ͘ͷΦϒδΣΫτ໋Ͱ͋Δɼͱ͍͏ԾઆΛ ར༻ͨ͠($ ˔ 4UJDLZNBSLCJUT($ ˔ લճͷ($Ҏ߱ʹ࡞ΒΕͨ͝Έ͚ͩճऩ ($ ($
($ର ($ର֎ ϐϯϙΠϯτͰ͝ΈΛճऩ
͕͜͜มΘͬͨɿΞϩέʔλ ˔ %BMWJL7.ɿEMNBMMPD ˔ HMJCDͷNBMMPDʢͷେݩʹͳͬͨΞϩέʔλʣ ˔ ฒߦϝϞϦׂͯϩοΫͰഉଞ੍ޚ ˔ "35ɿ3PT"MMPD ˔
"35ಠࣗͷϝϞϦΞϩέʔλ ˔ 4FHSFHBUFEGSFFMJTU ˔ ฒߦϝϞϦׂͯʹରԠ
ฒߦϝϞϦׂͯ ώʔϓ ۭ͖ྖҬ ༻த εϨου εϨου
ฒߦϝϞϦׂͯ ώʔϓ ۭ͖ྖҬ ༻த εϨου new Object(); εϨου new Object();
·ͱΊ ˔ "35͕ΜͬͯΔ
·ͱΊ ˔ "35͕ΜͬͯΔ ˔ ͱ͍͏ΑΓ%BMWJL7.͕ΨόΨόͩͬͨʁ ˔ ͱʹ͔͘ؤுͬͯΔɼࠓޙʹظ
·ͱΊ ˔ ฒߦ($ͷఀࢭՕॴ͕ΑΓ͘ͳͬͨ ˔ 458($ͷൃੜස͕͘ͳͬͨ ˔ -BSHF0CKFDU4QBDFʹΑΔஅยԽରࡦ ˔ ͜·ʹฒߦ($ ˔
εϧʔϓοτվળ ˔ ฒߦ($ɼੈผ($ ˔ ϝϞϦׂͯͷฒߦॲཧʹରԠ ˔ 3PT"MMPD