Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
The ownership in iOS
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Yuji Taniguchi
April 20, 2018
Programming
390
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
The ownership in iOS
Yuji Taniguchi
April 20, 2018
More Decks by Yuji Taniguchi
See All by Yuji Taniguchi
Zeroconf on iOS
natpenguin
2
1.4k
Zero Configuration
natpenguin
1
270
Other Decks in Programming
See All in Programming
Ghostty + Neovimで作る 透明でカッコ良い開発環境
j341nono
0
120
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
190
技術的負債を組織課題として解く-増えすぎたマイクロサービスとの戦い-
reimaru
1
2.3k
20260914 AIエージェント時代のPlatform Engineering LLM基盤とプロダクトの責務境界線
kanfab1
7
2.2k
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.2k
AI活用は、個人から組織へ|マルチプレイヤーエージェントハーネス「QM」の社内活用事例 / AI use is moving from individuals to orgs
rkaga
1
200
難しいけど、読めた。- OSSの入口に立った話。
sts11142
0
120
[GoCon2026] When Goroutines Are Not Enough: Runtime Locality in High-Throughput Go
takehaya
6
2.4k
AI Agent時代のリアーキテクチャ戦略と実践
hokaccha
9
5k
Agents on Rails - Rails at Scale 2026
irinanazarova
0
210
スマート反転とウェブアクセシビリティ
camiha
0
210
フロントエンドUIフレームワークのこれまでとこれから
ssssota
5
2.9k
Featured
See All Featured
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
480
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
600
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
850
GraphQLとの向き合い方2022年版
quramy
50
15k
Documentation Writing (for coders)
carmenintech
77
5.5k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
570
SEO for Brand Visibility & Recognition
aleyda
0
4.7k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
Claude Code のすすめ
schroneko
67
230k
Technical Leadership for Architectural Decision Making
baasie
3
580
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
340
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Transcript
The ownership in iOS Mixleap #11 in Osaka
@_natpenguin merpay iOS Software Engineer
@_natpenguin merpay iOS Software Engineer .filter { $0 == }
.map { $0 + } + [ , ✨ ] =
What is ownership?
It’s a management system for resource
It’s abstract word…
Ownership system is already used
Rust/C++/Swift… Ownership system is already used
Why we need ownership system?
None
- Speed
- Safety - Speed
- Safety - Speed - Concurrency
Safety
- Access conflict to Data Rust prevents these in compiling
- Access conflict to Data Rust prevents these in compiling
- Using after releasing resource
fn main() { let x = vec![1, 2, 3]; let
y = x; println!(“x[0] is {}", x[0]); } This code will be compiling error
fn main() { let x = vec![1, 2, 3]; take(x);
println!(“x[0] is {}", x[0]); } fn take(v: Vec<i32>) { // do something } This code will be compiling error
fn main() { let mut x = &100; let mut
y = &mut x; *y += 1; println!(“y is {}", y); } This code will be compiling error
It’s a difficult
None
Manifesto https://github.com/apple/swift/blob/master/docs/OwnershipManifesto.md
Q. What does swift want by using it?
A. Improving performance Q. What does swift want by using
it?
- Making extra copies at runtime Problem Point
- Making extra copies at runtime - Referencing to unique
resource Problem Point
- Making extra copies at runtime - Referencing to unique
resource - Overhead of reference count Problem Point
Point - Prevents simultaneously accessing to Data
Point - Prevents simultaneously accessing to Data - Give programmers
more control
Point - Prevents simultaneously accessing to Data - Give programmers
more control - Add types that can’t be implicitly copied
A1. Supporting a type that can’t copy Q. How does
swift improve performance?
A1. Supporting a type that can’t copy Q. How does
swift improve performance? A2. Law of exclusivity
New keywords - shared
func ==(left: shared String, right: shared String) -> Bool {
... } shared String isn’t copied
What is different with inout?
- shared - inout
New keywords - shared - moveonly
moveonly struct Foo { // some parameters }
moveonly extension Foo { // Some extensions }
extension Foo { moveonly func bar<U>(_ u: U) }
moveonly struct File { let descriptor: Int32 init(filename: String) throws
{ descriptor = Darwin.open(filename, O_RDONLY) } deinit { _ = Darwin.close(descriptor) } }
When we use it? - Performance tuning
When we use it? - More memory management - Performance
tuning
When we use it? - More memory management - Performance
tuning - Already know that no needed to copy
Thank you so much!