-
kumamo_tone
- 2165
- 3
- 0
- 0
![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
「テストケースでMemory Leakを発見する」でimport XCTAssertNoLeakのサンプルデモやろうとしているんだけど、色々あって面白いwww #tryswiftconf
2019-03-21 14:46:27![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
swiftのasの不思議な挙動 #tryswiftconf
2019-03-21 14:47:00![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
メモリリークの箱に入れる。クラスだけとりたい。AnyObjectでSwift3からstructもanyObjectになる #tryswiftconf pic.twitter.com/jpiV4Lyvzi
2019-03-21 14:48:18![](https://pbs.twimg.com/media/D2KPfLpUgAE6_RM.jpg:medium)
![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
tatunon さんだ。 いつもお世話になってます🙇♂️ I use he's library. github.com/tarunon/Instan… #tryswiftconf
2019-03-21 14:48:36![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
前調べたやつだ `as AnyObject` で何が起こるのか - Qiita qiita.com/takasek/items/… #tryswiftconf
2019-03-21 14:48:53![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
type(of: arg)をつかうといいかんじ #tryswiftconf pic.twitter.com/sb9aPtvLU9
2019-03-21 14:49:21![](https://pbs.twimg.com/media/D2KPukAU0AA1sYP.jpg:medium)
![](https://pbs.twimg.com/media/D2KPukBUwAApDD5.jpg:medium)
![](https://pbs.twimg.com/media/D2KPukAU4AEw5wa.jpg:medium)
![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
unwrap optionalをしたい。 #tryswiftconf
2019-03-21 14:49:33![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
asやisでAnyObject(クラス)かどうかは判定できないのでtypeofで実行時の型がAnyObjectTypeかどうか確認。なるほど。。。 #tryswiftconf
2019-03-21 14:50:41![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
optionalの向こう側の型が欲しい。anyから型をとる。アンラップするとオプショナルがとれる。型そのものでない #tryswiftconf pic.twitter.com/HUBokFU6GD
2019-03-21 14:50:59![](https://pbs.twimg.com/media/D2KQG6mVAAE5vsP.jpg:medium)