2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

NSDictionaryやNSArrayが初期化時にクラッシュする要因

Posted at

症状:
 NSDictionaryにint型やNSInteger型の整数をぶち込もう(initWithObjectsAndKeys使用)
 ↓
 その初期化変数でクラッシュ。
 NSArrayで似たような初期化処理を行うもクラッシュ。

原因:
 int型/NSInteger変数を[NSNumber numberWithInt:数字]に置き換えたら解決。
 NSIntegerもたしかlongのtypedefみたいなものだったので、Cな変数はダメっぽい。

2
2
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?